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.

Built from https://develop.svn.wordpress.org/trunk@52943


git-svn-id: http://core.svn.wordpress.org/trunk@52532 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Peter Wilson 2022-03-17 04:13:07 +00:00
parent d2c2dc1c10
commit 88e428a2e1
2 changed files with 9 additions and 1 deletions

View File

@ -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.
* }

View File

@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.0-alpha-52942';
$wp_version = '6.0-alpha-52943';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.