WP_Block_Supports::register()publicWP 5.6.0

Registers a block support.

Method of the class: WP_Block_Supports{}

No Hooks.

Return

null. Nothing (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() code WP 6.5.2

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 )
	);
}