Core Function
View Source on Trac ↗ register_block_pattern()
register_block_pattern( mixed $pattern_name, mixed $pattern_properties ) Registers a new block pattern.
Parameters 2 required
| Name / Type | Description |
|---|---|
| $pattern_name string | Block pattern name including namespace. Required |
| array | $pattern_properties List of properties for the block pattern. See WP_Block_Patterns_Registry::register() for accepted arguments. Required |
Return Value
(bool)
True if the pattern was registered with success and false otherwise.
Function Information
Since Version
5.5.0
Source File
wp-includes/class-wp-block-patterns-registry.php
Advertisement