[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

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

Border block support flag.

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

Defines 4 functions

  wp_register_border_support()
  wp_apply_border_support()
  wp_skip_border_serialization()
  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.

param: WP_Block_Type $block_type Block Type.
since: 5.8.0

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

param: WP_Block_Type $block_type Block type.
since: 5.8.0
return: bool

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.
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