Skip to content

Commit 5a0499a

Browse files
Add: Documentation for postTypes pattern property.
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: http://core.svn.wordpress.org/trunk@54402 1a063a9b-81f0-0310-95a4-ce76da25c4cd
1 parent 9940af4 commit 5a0499a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

wp-includes/class-wp-block-patterns-registry.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ final class WP_Block_Patterns_Registry {
6868
* Certain blocks support further specificity besides the block name
6969
* (e.g. for `core/template-part` you can specify areas
7070
* like `core/template-part/header` or `core/template-part/footer`).
71+
* @type array $postTypes An array of post types that the pattern is restricted to be used with.
72+
* The pattern will only be available when editing one of the post types
73+
* passed on the array. For all the other post types not part of the array
74+
* the pattern is not available at all.
7175
* @type array $keywords Optional. A list of aliases or keywords that help users discover the
7276
* pattern while searching.
7377
* }

wp-includes/version.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
* @global string $wp_version
1818
*/
19-
$wp_version = '6.2-alpha-54849';
19+
$wp_version = '6.2-alpha-54850';
2020

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

0 commit comments

Comments
 (0)