[ Index ] |
PHP Cross Reference of WordPress Trunk (Updated Daily) |
[Source view] [Print] [Project Stats]
Block support flags.
File Size: | 220 lines (6 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
WP_Block_Supports:: (6 methods):
get_instance()
init()
register()
apply_block_supports()
register_attributes()
get_block_wrapper_attributes()
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 registers 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: string[] Array of HTML attribute values keyed by their name. |
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. return: string String of HTML attributes. param: string[] $extra_attributes Optional. Array of extra attributes to render on the block wrapper. |
Generated : Sat Dec 21 08:20:01 2024 | Cross-referenced by PHPXref |