WP_Block_Bindings_Registry::unregister( string $source_name ): WP_Block_Bindings_Source|false

In this article

Unregisters a block bindings source.

Parameters

$source_namestringrequired
Block bindings source name including namespace.

Return

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

Source

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

Changelog

VersionDescription
6.5.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.