WP_Block_Bindings_Registry::unregister()publicWP 6.5.0

Unregisters a block bindings source.

Method of the class: WP_Block_Bindings_Registry{}

No Hooks.

Returns

WP_Block_Bindings_Source|false. The unregistered block bindings source on success and false otherwise.

Usage

$WP_Block_Bindings_Registry = new WP_Block_Bindings_Registry();
$WP_Block_Bindings_Registry->unregister( $source_name );
$source_name(string) (required)
Block bindings source name including namespace.

Changelog

Since 6.5.0 Introduced.

WP_Block_Bindings_Registry::unregister() code WP 6.8.1

public function unregister( string $source_name ) {
	if ( ! $this->is_registered( $source_name ) ) {
		_doing_it_wrong(
			__METHOD__,
			/* translators: %s: Block bindings source name. */
			sprintf( __( 'Block binding "%s" not found.' ), $source_name ),
			'6.5.0'
		);
		return false;
	}

	$unregistered_source = $this->sources[ $source_name ];
	unset( $this->sources[ $source_name ] );

	return $unregistered_source;
}