- Timestamp:
- 11/23/2021 09:35:57 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-block-patterns-registry.php
r52219 r52236 9 9 10 10 /** 11 * Class used for interacting with patterns.11 * Class used for interacting with block patterns. 12 12 * 13 13 * @since 5.5.0 … … 15 15 final class WP_Block_Patterns_Registry { 16 16 /** 17 * Registered patterns array.17 * Registered block patterns array. 18 18 * 19 19 * @since 5.5.0 … … 31 31 32 32 /** 33 * Registers a pattern.34 * 35 * @since 5.5.0 36 * 37 * @param string $pattern_name Pattern name including namespace.38 * @param array $pattern_properties{33 * Registers a block pattern. 34 * 35 * @since 5.5.0 36 * 37 * @param string $pattern_name Block pattern name including namespace. 38 * @param array $pattern_properties { 39 39 * List of properties for the block pattern. 40 40 * 41 41 * @type string $title Required. A human-readable title for the pattern. 42 42 * @type string $content Required. Block HTML markup for the pattern. 43 * @type string $description Visually hidden text used to describe the pattern in the43 * @type string $description Optional. Visually hidden text used to describe the pattern in the 44 44 * inserter. A description is optional, but is strongly 45 45 * encouraged when the title does not fully describe what the 46 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 scaled49 * preview within the pattern inserter. Optional.50 * @type array $categories A list of registered pattern categories used to group block47 * pattern while searching. 48 * @type int $viewportWidth Optional. The intended width of the pattern to allow for a scaled 49 * preview within the pattern inserter. 50 * @type array $categories Optional. A list of registered pattern categories used to group block 51 51 * patterns. Block patterns can be shown on multiple categories. 52 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 the55 * pattern while searching. Optional.53 * here. 54 * @type array $keywords Optional. A list of aliases or keywords that help users discover the 55 * pattern while searching. 56 56 * } 57 57 * @return bool True if the pattern was registered with success and false otherwise. … … 94 94 95 95 /** 96 * Unregisters a pattern.97 * 98 * @since 5.5.0 99 * 100 * @param string $pattern_name Pattern name including namespace.96 * Unregisters a block pattern. 97 * 98 * @since 5.5.0 99 * 100 * @param string $pattern_name Block pattern name including namespace. 101 101 * @return bool True if the pattern was unregistered with success and false otherwise. 102 102 */ … … 118 118 119 119 /** 120 * Retrieves an array containing the properties of a registered pattern.121 * 122 * @since 5.5.0 123 * 124 * @param string $pattern_name Pattern name including namespace.120 * Retrieves an array containing the properties of a registered block pattern. 121 * 122 * @since 5.5.0 123 * 124 * @param string $pattern_name Block pattern name including namespace. 125 125 * @return array Registered pattern properties. 126 126 */ … … 134 134 135 135 /** 136 * Retrieves all registered patterns.137 * 138 * @since 5.5.0 139 * 140 * @return array Array of arrays containing the registered patterns properties,136 * Retrieves all registered block patterns. 137 * 138 * @since 5.5.0 139 * 140 * @return array Array of arrays containing the registered block patterns properties, 141 141 * and per style. 142 142 */ … … 146 146 147 147 /** 148 * Checks if a pattern is registered.149 * 150 * @since 5.5.0 151 * 152 * @param string $pattern_name Pattern name including namespace.148 * Checks if a block pattern is registered. 149 * 150 * @since 5.5.0 151 * 152 * @param string $pattern_name Block pattern name including namespace. 153 153 * @return bool True if the pattern is registered, false otherwise. 154 154 */ … … 176 176 177 177 /** 178 * Registers a new pattern.179 * 180 * @since 5.5.0 181 * 182 * @param string $pattern_name Pattern name including namespace.178 * Registers a new block pattern. 179 * 180 * @since 5.5.0 181 * 182 * @param string $pattern_name Block pattern name including namespace. 183 183 * @param array $pattern_properties List of properties for the block pattern. 184 184 * See WP_Block_Patterns_Registry::register() for accepted arguments. … … 188 188 return WP_Block_Patterns_Registry::get_instance()->register( $pattern_name, $pattern_properties ); 189 189 } 190 /** 191 * Unregisters a pattern. 192 * 193 * @since 5.5.0 194 * 195 * @param string $pattern_name Pattern name including namespace. 190 191 /** 192 * Unregisters a block pattern. 193 * 194 * @since 5.5.0 195 * 196 * @param string $pattern_name Block pattern name including namespace. 196 197 * @return bool True if the pattern was unregistered with success and false otherwise. 197 198 */
Note: See TracChangeset
for help on using the changeset viewer.