mirror of
git://develop.git.wordpress.org/
synced 2025-03-20 20:09:53 +01:00
Editor/Docs: Add blockTypes
argument to WP_Block_Patterns_Registry::register()
docblock.
Add the optional `blockTypes` argument in the patten properties for `WP_Block_Patterns_Registry::register()`. Props vlad.olaru. Fixes #55303. See #54729. git-svn-id: https://develop.svn.wordpress.org/trunk@52943 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
3b8dc986d2
commit
9d1466908b
@ -33,6 +33,7 @@ final class WP_Block_Patterns_Registry {
|
||||
* Registers a block pattern.
|
||||
*
|
||||
* @since 5.5.0
|
||||
* @since 5.8.0 Added support for the `blockTypes` property.
|
||||
*
|
||||
* @param string $pattern_name Block pattern name including namespace.
|
||||
* @param array $pattern_properties {
|
||||
@ -51,6 +52,13 @@ final class WP_Block_Patterns_Registry {
|
||||
* patterns. Block patterns can be shown on multiple categories.
|
||||
* A category must be registered separately in order to be used
|
||||
* here.
|
||||
* @type array $blockTypes Optional. A list of block names including namespace that could use
|
||||
* the block pattern in certain contexts (placeholder, transforms).
|
||||
* The block pattern is available in the block editor inserter
|
||||
* regardless of this list of block names.
|
||||
* Certain blocks support further specificity besides the block name
|
||||
* (e.g. for `core/template-part` you can specify areas
|
||||
* like `core/template-part/header` or `core/template-part/footer`).
|
||||
* @type array $keywords Optional. A list of aliases or keywords that help users discover the
|
||||
* pattern while searching.
|
||||
* }
|
||||
|
Loading…
x
Reference in New Issue
Block a user