wpseek.com
A WordPress-centric search engine for devs and theme authors



register_block_pattern › WordPress Function

Since5.5.0
Deprecatedn/a
register_block_pattern ( $pattern_name, $pattern_properties )
Parameters: (2)
  • (string) $pattern_name Block pattern name including namespace.
    Required: Yes
  • (array) $pattern_properties List of properties for the block pattern. See WP_Block_Patterns_Registry::register() for accepted arguments.
    Required: Yes
Returns:
  • (bool) True if the pattern was registered with success and false otherwise.
Defined at:
Codex:

Registers a new block pattern.



Source

function register_block_pattern( $pattern_name, $pattern_properties ) {
	return WP_Block_Patterns_Registry::get_instance()->register( $pattern_name, $pattern_properties );
}