[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

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

Block support flags.

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

Defines 1 class

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

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

since: 5.6.0

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

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 attributes.
since: 5.6.0

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

since: 5.6.0

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



Generated: Wed Nov 13 01:00:02 2024 Cross-referenced by PHPXref 0.7.1