Make WordPress Core

Changeset 54850


Ignore:
Timestamp:
11/16/2022 04:34:29 PM (20 months ago)
Author:
jorgefilipecosta
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-block-patterns-registry.php

    r54133 r54850  
    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.
Note: See TracChangeset for help on using the changeset viewer.