Make WordPress Core


Ignore:
Timestamp:
02/16/2024 09:45:18 PM (14 months ago)
Author:
johnbillion
Message:

Docs: Various improvements and corrections to inline documentation.

See #59651

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/block-template-utils.php

    r57627 r57644  
    175175
    176176    /**
    177      * Filters the list of template types.
     177     * Filters the list of default template types.
    178178     *
    179179     * @since 5.9.0
     
    249249 * @access private
    250250 *
    251  * @param string $template_type 'wp_template' or 'wp_template_part'.
     251 * @param string $template_type Template type. Either 'wp_template' or 'wp_template_part'.
    252252 * @param string $slug          Template slug.
    253253 * @return array|null {
     
    306306 * @access private
    307307 *
    308  * @param string $template_type 'wp_template' or 'wp_template_part'.
     308 * @param string $template_type Template type. Either 'wp_template' or 'wp_template_part'.
    309309 * @param array  $query {
    310310 *     Arguments to retrieve templates. Optional, empty by default.
     
    521521 *
    522522 * @param array  $template_file Theme file.
    523  * @param string $template_type 'wp_template' or 'wp_template_part'.
     523 * @param string $template_type Template type. Either 'wp_template' or 'wp_template_part'.
    524524 * @return WP_Block_Template Template.
    525525 */
     
    926926 *     @type string   $post_type Post type to get the templates for.
    927927 * }
    928  * @param string $template_type 'wp_template' or 'wp_template_part'.
     928 * @param string $template_type Template type. Either 'wp_template' or 'wp_template_part'.
    929929 * @return WP_Block_Template[] Array of block templates.
    930930 */
     
    947947     *     @type string   $post_type Post type to get the templates for.
    948948     * }
    949      * @param string $template_type 'wp_template' or 'wp_template_part'.
     949     * @param string $template_type Template type. Either 'wp_template' or 'wp_template_part'.
    950950     */
    951951    $templates = apply_filters( 'pre_get_block_templates', null, $query, $template_type );
     
    10521052 *
    10531053 * @param string $id            Template unique identifier (example: 'theme_slug//template_slug').
    1054  * @param string $template_type Optional. Template type: 'wp_template' or 'wp_template_part'.
     1054 * @param string $template_type Optional. Template type. Either 'wp_template' or 'wp_template_part'.
    10551055 *                              Default 'wp_template'.
    10561056 * @return WP_Block_Template|null Template.
     
    10671067     *                                               or null to allow WP to run its normal queries.
    10681068     * @param string                 $id             Template unique identifier (example: 'theme_slug//template_slug').
    1069      * @param string                 $template_type  Template type: 'wp_template' or 'wp_template_part'.
     1069     * @param string                 $template_type  Template type. Either 'wp_template' or 'wp_template_part'.
    10701070     */
    10711071    $block_template = apply_filters( 'pre_get_block_template', null, $id, $template_type );
     
    11131113     * @param WP_Block_Template|null $block_template The found block template, or null if there isn't one.
    11141114     * @param string                 $id             Template unique identifier (example: 'theme_slug//template_slug').
    1115      * @param array                  $template_type  Template type: 'wp_template' or 'wp_template_part'.
     1115     * @param string                 $template_type  Template type. Either 'wp_template' or 'wp_template_part'.
    11161116     */
    11171117    return apply_filters( 'get_block_template', $block_template, $id, $template_type );
     
    11261126 *
    11271127 * @param string $id            Template unique identifier (example: 'theme_slug//template_slug').
    1128  * @param string $template_type Optional. Template type: 'wp_template' or 'wp_template_part'.
     1128 * @param string $template_type Optional. Template type. Either 'wp_template' or 'wp_template_part'.
    11291129 *                              Default 'wp_template'.
    11301130 * @return WP_Block_Template|null The found block template, or null if there isn't one.
     
    11411141     *                                               or null to allow WP to run its normal queries.
    11421142     * @param string                 $id             Template unique identifier (example: 'theme_slug//template_slug').
    1143      * @param string                 $template_type  Template type: 'wp_template' or 'wp_template_part'.
     1143     * @param string                 $template_type  Template type. Either 'wp_template' or 'wp_template_part'.
    11441144     */
    11451145    $block_template = apply_filters( 'pre_get_block_file_template', null, $id, $template_type );
     
    11751175     * @param WP_Block_Template|null $block_template The found block template, or null if there is none.
    11761176     * @param string                 $id             Template unique identifier (example: 'theme_slug//template_slug').
    1177      * @param string                 $template_type  Template type: 'wp_template' or 'wp_template_part'.
     1177     * @param string                 $template_type  Template type. Either 'wp_template' or 'wp_template_part'.
    11781178     */
    11791179    return apply_filters( 'get_block_file_template', $block_template, $id, $template_type );
     
    11851185 * @since 5.9.0
    11861186 *
    1187  * @param string $part The block template part to print. Use "header" or "footer".
     1187 * @param string $part The block template part to print. Either 'header' or 'footer'.
    11881188 */
    11891189function block_template_part( $part ) {
     
    12191219 *
    12201220 * @param string $path The path of the file in the theme.
    1221  * @return Bool Whether this file is in an ignored directory.
     1221 * @return bool Whether this file is in an ignored directory.
    12221222 */
    12231223function wp_is_theme_directory_ignored( $path ) {
     
    13481348 * @since 6.1.0
    13491349 *
    1350  * @param string  $slug           The template slug to be created.
    1351  * @param boolean $is_custom      Optional. Indicates if a template is custom or
     1350 * @param string $slug            The template slug to be created.
     1351 * @param bool   $is_custom       Optional. Indicates if a template is custom or
    13521352 *                                part of the template hierarchy. Default false.
    13531353 * @param string $template_prefix Optional. The template prefix for the created template.
Note: See TracChangeset for help on using the changeset viewer.