[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

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

Border block support flag.

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

Defines 3 functions

  wp_register_border_support()
  wp_apply_border_support()
  wp_has_border_feature_support()

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.

since: 5.8.0
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.

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

wp_has_border_feature_support( $block_type, $feature, $default_value = 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.

return: bool Whether the feature is supported.
since: 5.8.0
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_value Fallback value for feature support, defaults to false.



Generated: Tue Dec 24 01:00:02 2024 Cross-referenced by PHPXref 0.7.1