Skip to content

Commit

Permalink
Add: Documentation for postTypes pattern property.
Browse files Browse the repository at this point in the history
This commit documents the postTypes property part of the block pattern registration added in WordPress/gutenberg#41791, and meanwhile backported into core.

Props mcsf, ntsekouras.
Built from https://develop.svn.wordpress.org/trunk@54850


git-svn-id: https://core.svn.wordpress.org/trunk@54402 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information
jorgefilipecosta committed Nov 16, 2022
1 parent 1e267cd commit d65226f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions wp-includes/class-wp-block-patterns-registry.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ final class WP_Block_Patterns_Registry {
* 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 $postTypes An array of post types that the pattern is restricted to be used with.
* The pattern will only be available when editing one of the post types
* passed on the array. For all the other post types not part of the array
* the pattern is not available at all.
* @type array $keywords Optional. A list of aliases or keywords that help users discover the
* pattern while searching.
* }
Expand Down
2 changes: 1 addition & 1 deletion wp-includes/version.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
$wp_version = '6.2-alpha-54849';
$wp_version = '6.2-alpha-54850';

/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
Expand Down

0 comments on commit d65226f

Please sign in to comment.