[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/block-supports/ -> spacing.php (summary)

Spacing block support flag.

File Size: 94 lines (3 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 3 functions

  wp_register_spacing_support()
  wp_apply_spacing_support()
  wp_has_spacing_feature_support()

Functions
Functions that are not part of a class:

wp_register_spacing_support( $block_type )   X-Ref
Registers the style block attribute for block types that support it.

param: WP_Block_Type $block_type Block Type.
since: 5.8.0

wp_apply_spacing_support( $block_type, $block_attributes )   X-Ref
Add CSS classes for block spacing to the incoming attributes array.
This will be applied to the block markup in the front-end.

param: WP_Block_Type $block_type       Block Type.
param: array         $block_attributes Block attributes.
since: 5.8.0
return: array Block spacing CSS classes and inline styles.

wp_has_spacing_feature_support( $block_type, $feature, $default = false )   X-Ref
Checks whether the current block type supports the spacing feature requested.

param: WP_Block_Type $block_type Block type to check for support.
param: string        $feature    Name of the feature to check support for.
param: mixed         $default    Fallback value for feature support. Default false.
since: 5.8.0
return: bool Whether the feature is supported.



Generated: Mon Sep 20 01:00:04 2021 Cross-referenced by PHPXref 0.7.1