WP_Block_Bindings_Registry::get_registered()publicWP 6.5.0

Retrieves a registered block bindings source.

Method of the class: WP_Block_Bindings_Registry{}

No Hooks.

Return

WP_Block_Bindings_Source|null. The registered block bindings source, or null if it is not registered.

Usage

$WP_Block_Bindings_Registry = new WP_Block_Bindings_Registry();
$WP_Block_Bindings_Registry->get_registered( $source_name );
$source_name(string) (required)
The name of the source.

Changelog

Since 6.5.0 Introduced.

WP_Block_Bindings_Registry::get_registered() code WP 6.5.4

public function get_registered( string $source_name ) {
	if ( ! $this->is_registered( $source_name ) ) {
		return null;
	}

	return $this->sources[ $source_name ];
}