[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

title

Body

[close]

/wp-includes/ -> author-template.php (summary)

Author Template functions for use in themes. These functions must be used within the WordPress Loop.

File Size: 566 lines (17 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 16 functions

  get_the_author()
  the_author()
  get_the_modified_author()
  the_modified_author()
  get_the_author_meta()
  the_author_meta()
  get_the_author_link()
  the_author_link()
  get_the_author_posts()
  the_author_posts()
  get_the_author_posts_link()
  the_author_posts_link()
  get_author_posts_url()
  wp_list_authors()
  is_multi_author()
  __clear_multi_author_cache()

Functions
Functions that are not part of a class:

get_the_author( $deprecated = '' )   X-Ref
Retrieve the author of the current post.

return: string|null The author's display name.
param: string $deprecated Deprecated.

the_author( $deprecated = '', $deprecated_echo = true )   X-Ref
Display the name of the author of the current post.

The behavior of this function is based off of old functionality predating
get_the_author(). This function is not deprecated, but is designed to echo
the value from get_the_author() and as an result of any old theme that might
still use the old behavior will also pass the value from get_the_author().

The normal, expected behavior of this function is to echo the author and not
return it. However, backward compatibility has to be maintained.

return: string|null The author's display name, from get_the_author().
param: string $deprecated Deprecated.
param: string $deprecated_echo Deprecated. Use get_the_author(). Echo the string or return it.

get_the_modified_author()   X-Ref
Retrieve the author who last edited the current post.

return: string|void The author's display name.

the_modified_author()   X-Ref
Display the name of the author who last edited the current post,
if the author's ID is available.


get_the_author_meta( $field = '', $user_id = false )   X-Ref
Retrieves the requested data of the author of the current post.

Valid values for the `$field` parameter include:

- admin_color
- aim
- comment_shortcuts
- description
- display_name
- first_name
- ID
- jabber
- last_name
- nickname
- plugins_last_view
- plugins_per_page
- rich_editing
- syntax_highlighting
- user_activation_key
- user_description
- user_email
- user_firstname
- user_lastname
- user_level
- user_login
- user_nicename
- user_pass
- user_registered
- user_status
- user_url
- yim

return: string The author's field from the current author's DB object, otherwise an empty string.
param: string $field   Optional. The user field to retrieve. Default empty.
param: int    $user_id Optional. User ID.

the_author_meta( $field = '', $user_id = false )   X-Ref
Outputs the field from the user's DB object. Defaults to current post's author.

param: string $field   Selects the field of the users record. See get_the_author_meta()
param: int    $user_id Optional. User ID.

get_the_author_link()   X-Ref
Retrieve either author's link or author's name.

If the author has a home page set, return an HTML link, otherwise just return the
author's name.

return: string|null An HTML link if the author's url exist in user meta,

the_author_link()   X-Ref
Display either author's link or author's name.

If the author has a home page set, echo an HTML link, otherwise just echo the
author's name.


get_the_author_posts()   X-Ref
Retrieve the number of posts by the author of the current post.

return: int The number of posts by the author.

the_author_posts()   X-Ref
Display the number of posts by the author of the current post.


get_the_author_posts_link()   X-Ref
Retrieves an HTML link to the author page of the current post's author.

Returns an HTML-formatted link using get_author_posts_url().

return: string An HTML link to the author page.

the_author_posts_link( $deprecated = '' )   X-Ref
Displays an HTML link to the author page of the current post's author.

param: string $deprecated Unused.

get_author_posts_url( $author_id, $author_nicename = '' )   X-Ref
Retrieve the URL to the author page for the user with the ID provided.

return: string The URL to the author's page.
param: int    $author_id       Author ID.
param: string $author_nicename Optional. The author's nicename (slug). Default empty.

wp_list_authors( $args = '' )   X-Ref
List all the authors of the site, with several options available.

return: string|void The output, if echo is set to false.
param: string|array $args {

is_multi_author()   X-Ref
Determines whether this site has more than one author.

Checks to see if more than one author has published posts.

For more information on this and similar theme functions, check out
the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
Conditional Tags} article in the Theme Developer Handbook.

return: bool Whether or not we have more than one author

__clear_multi_author_cache()   X-Ref
Helper function to clear the cache for number of authors.




Generated: Wed Nov 21 08:20:01 2018 Cross-referenced by PHPXref 0.7