Add missing doc blocks to `author-template.php`.

See #32444.

Built from https://develop.svn.wordpress.org/trunk@32538


git-svn-id: http://core.svn.wordpress.org/trunk@32508 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Scott Taylor 2015-05-22 04:14:24 +00:00
parent 83dd461b2f
commit 5c6ffc4dd6
2 changed files with 24 additions and 9 deletions

View File

@ -15,7 +15,7 @@
* *
* @since 1.5.0 * @since 1.5.0
* *
* @uses $authordata The current author's DB object. * @global object $authordata The current author's DB object.
* *
* @param string $deprecated Deprecated. * @param string $deprecated Deprecated.
* @return string|null The author's display name. * @return string|null The author's display name.
@ -103,6 +103,9 @@ function the_modified_author() {
* Retrieve the requested data of the author of the current post. * Retrieve the requested data of the author of the current post.
* @link https://codex.wordpress.org/Template_Tags/the_author_meta * @link https://codex.wordpress.org/Template_Tags/the_author_meta
* @since 2.8.0 * @since 2.8.0
*
* @global object $authordata The current author's DB object.
*
* @param string $field selects the field of the users record. * @param string $field selects the field of the users record.
* @param int $user_id Optional. User ID. * @param int $user_id Optional. User ID.
* @return string The author's field from the current author's DB object. * @return string The author's field from the current author's DB object.
@ -134,12 +137,14 @@ function get_the_author_meta( $field = '', $user_id = false ) {
} }
/** /**
* Retrieve the requested data of the author of the current post. * Outputs the field from the user's DB object. Defaults to current post's author.
*
* @link https://codex.wordpress.org/Template_Tags/the_author_meta * @link https://codex.wordpress.org/Template_Tags/the_author_meta
*
* @since 2.8.0 * @since 2.8.0
*
* @param string $field selects the field of the users record. * @param string $field selects the field of the users record.
* @param int $user_id Optional. User ID. * @param int $user_id Optional. User ID.
* @echo string The author's field from the current author's DB object.
*/ */
function the_author_meta( $field = '', $user_id = false ) { function the_author_meta( $field = '', $user_id = false ) {
$author_meta = get_the_author_meta( $field, $user_id ); $author_meta = get_the_author_meta( $field, $user_id );
@ -222,17 +227,20 @@ function the_author_posts() {
* *
* @link https://codex.wordpress.org/Template_Tags/the_author_posts_link * @link https://codex.wordpress.org/Template_Tags/the_author_posts_link
* @since 1.2.0 * @since 1.2.0
* @param string $deprecated Deprecated.
* *
* @return false|null * @global object $authordata The current author's DB object.
*
* @param string $deprecated Deprecated.
*/ */
function the_author_posts_link($deprecated = '') { function the_author_posts_link($deprecated = '') {
if ( !empty( $deprecated ) ) if ( !empty( $deprecated ) )
_deprecated_argument( __FUNCTION__, '2.1' ); _deprecated_argument( __FUNCTION__, '2.1' );
global $authordata; global $authordata;
if ( !is_object( $authordata ) ) if ( ! is_object( $authordata ) ) {
return false; return;
}
$link = sprintf( $link = sprintf(
'<a href="%1$s" title="%2$s" rel="author">%3$s</a>', '<a href="%1$s" title="%2$s" rel="author">%3$s</a>',
esc_url( get_author_posts_url( $authordata->ID, $authordata->user_nicename ) ), esc_url( get_author_posts_url( $authordata->ID, $authordata->user_nicename ) ),
@ -254,7 +262,9 @@ function the_author_posts_link($deprecated = '') {
* Retrieve the URL to the author page for the user with the ID provided. * Retrieve the URL to the author page for the user with the ID provided.
* *
* @since 2.1.0 * @since 2.1.0
* @uses $wp_rewrite WP_Rewrite *
* @global WP_Rewrite $wp_rewrite
*
* @return string The URL to the author's page. * @return string The URL to the author's page.
*/ */
function get_author_posts_url($author_id, $author_nicename = '') { function get_author_posts_url($author_id, $author_nicename = '') {
@ -296,6 +306,8 @@ function get_author_posts_url($author_id, $author_nicename = '') {
* *
* @since 1.2.0 * @since 1.2.0
* *
* @global wpdb $wpdb
*
* @param string|array $args { * @param string|array $args {
* Optional. Array or string of default arguments. * Optional. Array or string of default arguments.
* *
@ -427,6 +439,9 @@ function wp_list_authors( $args = '' ) {
* Checks to see if more than one author has published posts. * Checks to see if more than one author has published posts.
* *
* @since 3.2.0 * @since 3.2.0
*
* @global wpdb $wpdb
*
* @return bool Whether or not we have more than one author * @return bool Whether or not we have more than one author
*/ */
function is_multi_author() { function is_multi_author() {

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.3-alpha-32537'; $wp_version = '4.3-alpha-32538';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.