Make WordPress Core

Changeset 40952


Ignore:
Timestamp:
06/26/2017 06:23:52 PM (7 years ago)
Author:
DrewAPicture
Message:

Docs: List out accepted values for the $field parameter in get_the_author_meta().

Props choongsavvii.
Fixes #38258.

File:
1 edited

Legend:

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

    r40899 r40952  
    112112
    113113/**
    114  * Retrieve the requested data of the author of the current post.
    115  * @link https://codex.wordpress.org/Template_Tags/the_author_meta
     114 * Retrieves the requested data of the author of the current post.
     115 *
     116 * Valid values for the `$field` parameter include:
     117 *
     118 * - admin_color
     119 * - aim
     120 * - comment_shortcuts
     121 * - description
     122 * - display_name
     123 * - first_name
     124 * - ID
     125 * - jabber
     126 * - last_name
     127 * - nickname
     128 * - plugins_last_view
     129 * - plugins_per_page
     130 * - rich_editing
     131 * - user_activation_key
     132 * - user_description
     133 * - user_email
     134 * - user_firstname
     135 * - user_lastname
     136 * - user_level
     137 * - user_login
     138 * - user_nicename
     139 * - user_pass
     140 * - user_registered
     141 * - user_status
     142 * - user_url
     143 * - yim
     144 *
    116145 * @since 2.8.0
    117146 *
    118147 * @global object $authordata The current author's DB object.
    119148 *
    120  * @param string $field selects the field of the users record.
    121  * @param int $user_id Optional. User ID.
     149 * @param string $field   Optional. The user field to retrieve. Default empty.
     150 * @param int    $user_id Optional. User ID.
    122151 * @return string The author's field from the current author's DB object, otherwise an empty string.
    123152 */
     
    155184 * Outputs the field from the user's DB object. Defaults to current post's author.
    156185 *
    157  * @link https://codex.wordpress.org/Template_Tags/the_author_meta
    158  *
    159186 * @since 2.8.0
    160187 *
    161  * @param string $field selects the field of the users record.
    162  * @param int $user_id Optional. User ID.
     188 * @param string $field   Selects the field of the users record. See get_the_author_meta()
     189 *                        for the list of possible fields.
     190 * @param int    $user_id Optional. User ID.
     191 *
     192 * @see get_the_author_meta()
    163193 */
    164194function the_author_meta( $field = '', $user_id = false ) {
Note: See TracChangeset for help on using the changeset viewer.