WP_Block_Supports::register() WordPress Method

The register() method is used to register a new block support. This is done by providing a name and an array of settings. The register() method can be used to override an existing block support by providing the same name.

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.


Top ↑

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

Top ↑

Changelog

Changelog
VersionDescription
5.6.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.