A WordPress-centric search engine for devs and theme authors



register_block_pattern ›

Since5.5.0
Deprecatedn/a
register_block_pattern ( $pattern_name, $pattern_properties )
Parameters: (2)
  • (string) $pattern_name Pattern name including namespace.
    Required: Yes
  • (array) $pattern_properties Array containing the properties of the pattern.
    Required: Yes
Returns:
  • (bool) True if the pattern was registered with success and false otherwise.
Defined at:
Codex:

Registers a new pattern.



Source

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