Make WordPress Core


Ignore:
Timestamp:
11/23/2021 09:35:57 PM (2 months ago)
Author:
johnbillion
Message:

Docs: Various docblock corrections and improvements.

See #53399

File:
1 edited

Legend:

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

    r52219 r52236  
    99
    1010/**
    11  * Class used for interacting with patterns.
     11 * Class used for interacting with block patterns.
    1212 *
    1313 * @since 5.5.0
     
    1515final class WP_Block_Patterns_Registry {
    1616    /**
    17      * Registered patterns array.
     17     * Registered block patterns array.
    1818     *
    1919     * @since 5.5.0
     
    3131
    3232    /**
    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 {
    3939     *     List of properties for the block pattern.
    4040     *
    4141     *     @type string $title         Required. A human-readable title for the pattern.
    4242     *     @type string $content       Required. Block HTML markup for the pattern.
    43      *     @type string $description   Visually hidden text used to describe the pattern in the
     43     *     @type string $description   Optional. Visually hidden text used to describe the pattern in the
    4444     *                                 inserter. A description is optional, but is strongly
    4545     *                                 encouraged when the title does not fully describe what the
    4646     *                                 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
     47     *                                 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
    5151     *                                 patterns. Block patterns can be shown on multiple categories.
    5252     *                                 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.
     53     *                                 here.
     54     *     @type array  $keywords      Optional. A list of aliases or keywords that help users discover the
     55     *                                 pattern while searching.
    5656     * }
    5757     * @return bool True if the pattern was registered with success and false otherwise.
     
    9494
    9595    /**
    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.
    101101     * @return bool True if the pattern was unregistered with success and false otherwise.
    102102     */
     
    118118
    119119    /**
    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.
    125125     * @return array Registered pattern properties.
    126126     */
     
    134134
    135135    /**
    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,
    141141     *               and per style.
    142142     */
     
    146146
    147147    /**
    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.
    153153     * @return bool True if the pattern is registered, false otherwise.
    154154     */
     
    176176
    177177/**
    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.
    183183 * @param array  $pattern_properties List of properties for the block pattern.
    184184 *                                   See WP_Block_Patterns_Registry::register() for accepted arguments.
     
    188188    return WP_Block_Patterns_Registry::get_instance()->register( $pattern_name, $pattern_properties );
    189189}
    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.
    196197 * @return bool True if the pattern was unregistered with success and false otherwise.
    197198 */
Note: See TracChangeset for help on using the changeset viewer.