Changeset 52219
- Timestamp:
- 11/19/2021 07:04:01 PM (3 years ago)
- Location:
- trunk/src/wp-includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-block-pattern-categories-registry.php
r51154 r52219 34 34 * 35 35 * @param string $category_name Pattern category name including namespace. 36 * @param array $category_properties Array containing the properties of the category: label. 36 * @param array $category_properties { 37 * List of properties for the block pattern category. 38 * 39 * @type string $label Required. A human-readable label for the pattern category. 40 * } 37 41 * @return bool True if the pattern was registered with success and false otherwise. 38 42 */ … … 142 146 * 143 147 * @param string $category_name Pattern category name including namespace. 144 * @param array $category_properties Array containing the properties of the category. 148 * @param array $category_properties List of properties for the block pattern. 149 * See WP_Block_Pattern_Categories_Registry::register() for 150 * accepted arguments. 145 151 * @return bool True if the pattern category was registered with success and false otherwise. 146 152 */ -
trunk/src/wp-includes/class-wp-block-patterns-registry.php
r51154 r52219 36 36 * 37 37 * @param string $pattern_name Pattern name including namespace. 38 * @param array $pattern_properties Array containing the properties of the pattern: title, 39 * content, description, viewportWidth, categories, keywords. 38 * @param array $pattern_properties { 39 * List of properties for the block pattern. 40 * 41 * @type string $title Required. A human-readable title for the pattern. 42 * @type string $content Required. Block HTML markup for the pattern. 43 * @type string $description Visually hidden text used to describe the pattern in the 44 * inserter. A description is optional, but is strongly 45 * encouraged when the title does not fully describe what the 46 * pattern does. The description will help users discover the 47 * pattern while searching. Optional. 48 * @type int $viewportWidth The intended width of the pattern to allow for a scaled 49 * preview within the pattern inserter. Optional. 50 * @type array $categories A list of registered pattern categories used to group block 51 * patterns. Block patterns can be shown on multiple categories. 52 * A category must be registered separately in order to be used 53 * here. Optional. 54 * @type array $keywords A list of aliases or keywords that help users discover the 55 * pattern while searching. Optional. 56 * } 40 57 * @return bool True if the pattern was registered with success and false otherwise. 41 58 */ … … 164 181 * 165 182 * @param string $pattern_name Pattern name including namespace. 166 * @param array $pattern_properties Array containing the properties of the pattern. 183 * @param array $pattern_properties List of properties for the block pattern. 184 * See WP_Block_Patterns_Registry::register() for accepted arguments. 167 185 * @return bool True if the pattern was registered with success and false otherwise. 168 186 */ … … 170 188 return WP_Block_Patterns_Registry::get_instance()->register( $pattern_name, $pattern_properties ); 171 189 } 172 173 190 /** 174 191 * Unregisters a pattern.
Note: See TracChangeset
for help on using the changeset viewer.