[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)





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

Border block support flag.

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

Defines 4 functions


Functions that are not part of a class:

wp_register_border_support( $block_type )   X-Ref
Registers the style attribute used by the border feature if needed for block
types that support borders.

param: WP_Block_Type $block_type Block Type.

wp_apply_border_support( $block_type, $block_attributes )   X-Ref
Adds CSS classes and inline styles for border styles 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.
return: array Border CSS classes and inline styles.

wp_skip_border_serialization( $block_type )   X-Ref
Checks whether serialization of the current block's border properties should

param: WP_Block_Type $block_type Block type.
return: bool Whether serialization of the current block's border properties

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

If the `__experimentalBorder` support flag is a boolean `true` all border
support features are available. Otherwise, the specific feature's support
flag nested under `experimentalBorder` must be enabled for the feature
to be opted into.

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, defaults to false.
return: bool Whether the feature is supported.

Generated : Thu Jan 27 08:20:02 2022 Cross-referenced by PHPXref