Make WordPress Core

Changeset 45086


Ignore:
Timestamp:
04/01/2019 02:22:06 PM (6 years ago)
Author:
SergeyBiryukov
Message:

Docs: Correct parameter types for the_author(), get_the_author_meta(), and the_author_meta().

Props subrataemfluence.
Fixes #45596.

File:
1 edited

Legend:

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

    r44616 r45086  
    5353 * @link https://codex.wordpress.org/Template_Tags/the_author
    5454 *
    55  * @param string $deprecated Deprecated.
    56  * @param string $deprecated_echo Deprecated. Use get_the_author(). Echo the string or return it.
     55 * @param string $deprecated      Deprecated.
     56 * @param bool  $deprecated_echo Deprecated. Use get_the_author(). Echo the string or return it.
    5757 * @return string|null The author's display name, from get_the_author().
    5858 */
     
    154154 * @global object $authordata The current author's DB object.
    155155 *
    156  * @param string $field   Optional. The user field to retrieve. Default empty.
    157  * @param int    $user_id Optional. User ID.
     156 * @param string    $field   Optional. The user field to retrieve. Default empty.
     157 * @param int|false $user_id Optional. User ID.
    158158 * @return string The author's field from the current author's DB object, otherwise an empty string.
    159159 */
     
    182182     * @since 4.3.0 The `$original_user_id` parameter was added.
    183183     *
    184      * @param string   $value            The value of the metadata.
    185      * @param int      $user_id          The user ID for the value.
    186      * @param int|bool $original_user_id The original user ID, as passed to the function.
     184     * @param string    $value            The value of the metadata.
     185     * @param int       $user_id          The user ID for the value.
     186     * @param int|false $original_user_id The original user ID, as passed to the function.
    187187     */
    188188    return apply_filters( "get_the_author_{$field}", $value, $user_id, $original_user_id );
     
    194194 * @since 2.8.0
    195195 *
    196  * @param string $field   Selects the field of the users record. See get_the_author_meta()
    197  *                        for the list of possible fields.
    198  * @param int    $user_id Optional. User ID.
     196 * @param string    $field   Selects the field of the users record. See get_the_author_meta()
     197 *                           for the list of possible fields.
     198 * @param int|false $user_id Optional. User ID.
    199199 *
    200200 * @see get_the_author_meta()
     
    210210     * @since 2.8.0
    211211     *
    212      * @param string $author_meta The value of the metadata.
    213      * @param int    $user_id     The user ID.
     212     * @param string    $author_meta The value of the metadata.
     213     * @param int|false $user_id     The user ID.
    214214     */
    215215    echo apply_filters( "the_author_{$field}", $author_meta, $user_id );
Note: See TracChangeset for help on using the changeset viewer.