[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)





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

Block support flags.

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

Defines 1 class

WP_Block_Supports:: (6 methods):

Class: WP_Block_Supports  - X-Ref

Class encapsulating and implementing Block Supports.

get_instance()   X-Ref
Utility method to retrieve the main instance of the class.

The instance will be created if it does not exist yet.

return: WP_Block_Supports The main instance.

init()   X-Ref
Initializes the block supports. It registes the block supports block attributes.

register( $block_support_name, $block_support_config )   X-Ref
Registers a block support.

param: string $block_support_name Block support name.
param: array  $block_support_config Array containing the properties of the block support.

apply_block_supports()   X-Ref
Generates an array of HTML attributes, such as classes, by applying to
the given block all of the features that the block supports.

return: array Array of HTML attributes.

register_attributes()   X-Ref
Registers the block attributes required by the different block supports.

get_block_wrapper_attributes( $extra_attributes = array()   X-Ref
Generates a string of attributes by applying to the current block being
rendered all of the features that the block supports.

param: array $extra_attributes Optional. Extra attributes to render on the block wrapper.
return: string String of HTML classes.

Generated : Mon Jan 18 08:20:02 2021 Cross-referenced by PHPXref