WordPress.org

Make WordPress Core

Ticket #8776: 8776.5.diff

File 8776.5.diff, 1.2 KB (added by coffee2code, 9 years ago)

The same as 8776_4.diff but also with some docs

  • wp-includes/author-template.php

     
    8383 * Retrieve the requested data of the author of the current post.
    8484 * @link http://codex.wordpress.org/Template_Tags/the_author_meta
    8585 * @since 2.8.0
     86 * @uses $authordata The current author's DB object (if $user_id not specified).
    8687 * @param string $field selects the field of the users record.
     88 * @param int $user_id Optional. User ID.
    8789 * @return string The author's field from the current author's DB object.
    8890 */
    8991function get_the_author_meta($field = '', $user_id = false) {
    9092        if ( ! $user_id )
    9193                global $authordata;
    9294        else
    93                 $authordata = get_userdata( $auth_id );
     95                $authordata = get_userdata( $user_id );
    9496
    9597        $field = strtolower($field);
    9698        $user_field = "user_$field";
     
    110112 * @link http://codex.wordpress.org/Template_Tags/the_author_meta
    111113 * @since 2.8.0
    112114 * @param string $field selects the field of the users record.
     115 * @param int $user_id Optional. User ID.
    113116 * @echo string The author's field from the current author's DB object.
    114117 */
    115118function the_author_meta($field = '', $user_id = false) {