- Timestamp:
- 02/01/2023 03:00:19 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-block-patterns-registry.php
r54850 r55173 44 44 * @since 5.5.0 45 45 * @since 5.8.0 Added support for the `blockTypes` property. 46 * @since 6.1.0 Added support for the `postTypes` property. 47 * @since 6.2.0 Added support for the `templateTypes` property. 46 48 * 47 49 * @param string $pattern_name Block pattern name including namespace. … … 51 53 * @type string $title Required. A human-readable title for the pattern. 52 54 * @type string $content Required. Block HTML markup for the pattern. 53 * @type string $description Optional. Visually hidden text used to describe the pattern in the54 * in serter. A description is optional, but is strongly55 * @type string $description Optional. Visually hidden text used to describe the pattern 56 * in the inserter. A description is optional, but is strongly 55 57 * encouraged when the title does not fully describe what the 56 58 * pattern does. The description will help users discover the … … 58 60 * @type int $viewportWidth Optional. The intended width of the pattern to allow for a scaled 59 61 * preview within the pattern inserter. 60 * @type array $categories Optional. A list of registered pattern categories used to group block 61 * patterns. Block patterns can be shown on multiple categories. 62 * A category must be registered separately in order to be used 63 * here. 62 * @type array $categories Optional. A list of registered pattern categories used to group 63 * block patterns. Block patterns can be shown on multiple categories. 64 * A category must be registered separately in order to be used here. 65 * @type array $keywords Optional. A list of aliases or keywords that help users discover 66 * the pattern while searching. 64 67 * @type array $blockTypes Optional. A list of block names including namespace that could use 65 68 * the block pattern in certain contexts (placeholder, transforms). … … 69 72 * (e.g. for `core/template-part` you can specify areas 70 73 * 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. 75 * @type array $keywords Optional. A list of aliases or keywords that help users discover the 76 * pattern while searching. 74 * @type array $postTypes Optional. An array of post types that the pattern is restricted 75 * to be used with. The pattern will only be available when editing one 76 * of the post types passed on the array. For all the other post types 77 * not part of the array the pattern is not available at all. 78 * @type array $templateTypes Optional. An array of template types where the pattern fits. 77 79 * } 78 80 * @return bool True if the pattern was registered with success and false otherwise.
Note: See TracChangeset
for help on using the changeset viewer.