WP_Block_Patterns_Registry::get_registered( string $pattern_name ): array

In this article

Retrieves an array containing the properties of a registered block pattern.

Parameters

$pattern_namestringrequired
Block pattern name including namespace.

Return

array Registered pattern properties.

Source

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

	$pattern            = $this->registered_patterns[ $pattern_name ];
	$pattern['content'] = $this->get_content( $pattern_name );
	$pattern['content'] = $this->prepare_content( $pattern, get_hooked_blocks() );

	return $pattern;
}

Changelog

VersionDescription
5.5.0Introduced.

User Contributed Notes

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