Add missing doc blocks to `author-template.php`.
See #32444. git-svn-id: https://develop.svn.wordpress.org/trunk@32538 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
d723ecc5f5
commit
339d3be328
|
@ -15,7 +15,7 @@
|
|||
*
|
||||
* @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.
|
||||
* @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.
|
||||
* @link https://codex.wordpress.org/Template_Tags/the_author_meta
|
||||
* @since 2.8.0
|
||||
*
|
||||
* @global object $authordata The current author's DB object.
|
||||
*
|
||||
* @param string $field selects the field of the users record.
|
||||
* @param int $user_id Optional. User ID.
|
||||
* @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
|
||||
*
|
||||
* @since 2.8.0
|
||||
*
|
||||
* @param string $field selects the field of the users record.
|
||||
* @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 ) {
|
||||
$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
|
||||
* @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 = '') {
|
||||
if ( !empty( $deprecated ) )
|
||||
_deprecated_argument( __FUNCTION__, '2.1' );
|
||||
|
||||
global $authordata;
|
||||
if ( !is_object( $authordata ) )
|
||||
return false;
|
||||
if ( ! is_object( $authordata ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$link = sprintf(
|
||||
'<a href="%1$s" title="%2$s" rel="author">%3$s</a>',
|
||||
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.
|
||||
*
|
||||
* @since 2.1.0
|
||||
* @uses $wp_rewrite WP_Rewrite
|
||||
*
|
||||
* @global WP_Rewrite $wp_rewrite
|
||||
*
|
||||
* @return string The URL to the author's page.
|
||||
*/
|
||||
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
|
||||
*
|
||||
* @global wpdb $wpdb
|
||||
*
|
||||
* @param string|array $args {
|
||||
* 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.
|
||||
*
|
||||
* @since 3.2.0
|
||||
*
|
||||
* @global wpdb $wpdb
|
||||
*
|
||||
* @return bool Whether or not we have more than one author
|
||||
*/
|
||||
function is_multi_author() {
|
||||
|
|
Loading…
Reference in New Issue