From 66706c996cb551f2d67ca6aafd688c838ff034e8 Mon Sep 17 00:00:00 2001 From: Jorge Costa Date: Wed, 16 Nov 2022 16:34:29 +0000 Subject: [PATCH] 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. git-svn-id: https://develop.svn.wordpress.org/trunk@54850 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-block-patterns-registry.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/wp-includes/class-wp-block-patterns-registry.php b/src/wp-includes/class-wp-block-patterns-registry.php index bfbc651341..a11c99d8c8 100644 --- a/src/wp-includes/class-wp-block-patterns-registry.php +++ b/src/wp-includes/class-wp-block-patterns-registry.php @@ -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. * }