WP_Block_Supports::register()
Registers a block support.
Method of the class: WP_Block_Supports{}
No Hooks.
Return
null
. Ничего (null).
Usage
$WP_Block_Supports = new WP_Block_Supports(); $WP_Block_Supports->register( $block_support_name, $block_support_config );
- $block_support_name(string) (required)
- Block support name.
- $block_support_config(array) (required)
- Array containing the properties of the block support.
Changelog
Since 5.6.0 | Introduced. |
WP_Block_Supports::register() WP Block Supports::register code WP 6.3
public function register( $block_support_name, $block_support_config ) { $this->block_supports[ $block_support_name ] = array_merge( $block_support_config, array( 'name' => $block_support_name ) ); }