Make WordPress Core

Changeset 60121


Ignore:
Timestamp:
04/02/2025 09:56:31 PM (4 months ago)
Author:
SergeyBiryukov
Message:

Docs: Correct the type of the $name parameter in get_template_part action.

The value cannot be null at this point, as it is converted to a string a few lines above.

Follow-up to [45059], [55870], [60120].

See #63215, #63166.

File:
1 edited

Legend:

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

    r60120 r60121  
    176176     *
    177177     * @param string      $slug The slug name for the generic template.
    178      * @param string|null $name The name of the specialized template or null if
    179      *                          there is none.
     178     * @param string|null $name The name of the specialized template
     179     *                          or null if there is none.
    180180     * @param array       $args Additional arguments passed to the template.
    181181     */
     
    196196     * @since 5.5.0 The `$args` parameter was added.
    197197     *
    198      * @param string      $slug      The slug name for the generic template.
    199      * @param string|null $name      The name of the specialized template or an empty
    200      *                              string if there is none.
    201      * @param string[]    $templates Array of template files to search for, in order.
    202      * @param array       $args      Additional arguments passed to the template.
     198     * @param string   $slug      The slug name for the generic template.
     199     * @param string   $name      The name of the specialized template
     200     *                            or an empty string if there is none.
     201     * @param string[] $templates Array of template files to search for, in order.
     202     * @param array    $args      Additional arguments passed to the template.
    203203     */
    204204    do_action( 'get_template_part', $slug, $name, $templates, $args );
Note: See TracChangeset for help on using the changeset viewer.