WP_Block_Supports::register( string $block_support_name, array $block_support_config )

Registers a block support.

Parameters

$block_support_name

(string) (Required) Block support name.

$block_support_config

(array) (Required) Array containing the properties of the block support.

Source

File: wp-includes/class-wp-block-supports.php

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

Changelog

Version Description
5.6.0 Introduced.

© 2003–2021 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/classes/wp_block_supports/register