Make WordPress Core

Ticket #25229: author-template.2.patch

File author-template.2.patch, 2.9 KB (added by Frank Klein, 11 years ago)

Updated patch containing only inline documentation changes.

  • wp-includes/author-template.php

     
    2626        if ( !empty( $deprecated ) )
    2727                _deprecated_argument( __FUNCTION__, '2.1' );
    2828
     29        /**
     30         * The display name of the current post's author.
     31         *
     32         * @since 2.9.0
     33         *
     34         * @param string $authordata->display_name The author's display name.
     35         */
    2936        return apply_filters('the_author', is_object($authordata) ? $authordata->display_name : null);
    3037}
    3138
     
    7178function get_the_modified_author() {
    7279        if ( $last_id = get_post_meta( get_post()->ID, '_edit_last', true) ) {
    7380                $last_user = get_userdata($last_id);
     81
     82                /**
     83                 * The display name of author who last edited the current post.
     84                 *
     85                 * @since 2.8.0
     86                 *
     87                 * @param string $last_user->display_name The author's display name.
     88                 */
    7489                return apply_filters('the_modified_author', $last_user->display_name);
    7590        }
    7691}
     
    108123
    109124        $value = isset( $authordata->$field ) ? $authordata->$field : '';
    110125
     126        /**
     127         * The value of the requested user metadata.
     128         *
     129         * @since 2.8.0
     130         *
     131         * @param string The name of the metadata.
     132         * @param string The value of the metadata.
     133         * @param int    The user ID.
     134         */
    111135        return apply_filters( 'get_the_author_' . $field, $value, $user_id );
    112136}
    113137
     
    120144 * @echo string The author's field from the current author's DB object.
    121145 */
    122146function the_author_meta($field = '', $user_id = false) {
     147        /**
     148         * The value of the requested user metadata.
     149         *
     150         * @since 2.8.0
     151         *
     152         * @param string The name of the metadata.
     153         * @param string The value of the metadata.
     154         * @param int    The user ID.
     155         */
    123156        echo apply_filters('the_author_' . $field, get_the_author_meta($field, $user_id), $user_id);
    124157}
    125158
     
    204237                esc_attr( sprintf( __( 'Posts by %s' ), get_the_author() ) ),
    205238                get_the_author()
    206239        );
     240
     241        /**
     242         * The link to the author page of the author of the current post.
     243         *
     244         * @since 2.9.0
     245         *
     246         * @param string HTML link
     247         */
    207248        echo apply_filters( 'the_author_posts_link', $link );
    208249}
    209250
     
    232273                $link = home_url( user_trailingslashit( $link ) );
    233274        }
    234275
     276        /**
     277         * The URL to the author's page.
     278         *
     279         * @since 2.1.0
     280         *
     281         * @param string $link The URL to the author's page.
     282         * @param int    $author_id The ID of a user.
     283         * @param string $author_nicename Optional. The author's nice name.
     284         */
    235285        $link = apply_filters('author_link', $link, $author_id, $author_nicename);
    236286
    237287        return $link;
     
    378428                set_transient( 'is_multi_author', $is_multi_author );
    379429        }
    380430
     431        /**
     432         * Whether the site has more than one author with published posts.
     433         *
     434         * @since 3.2.0
     435         *
     436         * @param bool $is_multi_author Is there more than one author.
     437         */
    381438        return apply_filters( 'is_multi_author', (bool) $is_multi_author );
    382439}
    383440