WP_Block_Patterns_Registry::get_all_registered()publicWP 5.5.0

Retrieves all registered block patterns.

{} It's a method of the class: WP_Block_Patterns_Registry{}

No Hooks.

Return

Array[]. Array of arrays containing the registered block patterns properties, and per style.

Usage

$WP_Block_Patterns_Registry = new WP_Block_Patterns_Registry();
$WP_Block_Patterns_Registry->get_all_registered( $outside_init_only );
$outside_init_only(true|false)
Return only patterns registered outside the init action.
Default: false

Changelog

Since 5.5.0 Introduced.

Code of WP_Block_Patterns_Registry::get_all_registered() WP 6.0

public function get_all_registered( $outside_init_only = false ) {
	return array_values(
		$outside_init_only
			? $this->registered_patterns_outside_init
			: $this->registered_patterns
	);
}