Template: Get the author name directly from $authordata.

Since [25574] `$authordata` gets set up in `WP::register_globals()` - no need
to take a detour over the queried object.

Props greenshady for initial patch.
Fixes #34516.

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


git-svn-id: http://core.svn.wordpress.org/trunk@35664 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Konstantin Obenland 2015-11-19 00:06:25 +00:00
parent 3f2c4fa8d2
commit b875cd1b72
2 changed files with 3 additions and 3 deletions

View File

@ -872,8 +872,8 @@ function wp_get_document_title() {
$title['title'] = sprintf( __( 'Search Results for “%s”' ), get_search_query() );
// If on an author archive, use the author's display name.
} elseif ( is_author() && $author = get_queried_object() ) {
$title['title'] = $author->display_name;
} elseif ( is_author() ) {
$title['title'] = get_the_author();
// If on a post type archive, use the post type archive title.
} elseif ( is_post_type_archive() ) {

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.4-beta4-35699';
$wp_version = '4.4-beta4-35700';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.