From b875cd1b72aeb2fd7ba72152361e9afeb11a1983 Mon Sep 17 00:00:00 2001 From: Konstantin Obenland Date: Thu, 19 Nov 2015 00:06:25 +0000 Subject: [PATCH] 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 --- wp-includes/general-template.php | 4 ++-- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wp-includes/general-template.php b/wp-includes/general-template.php index da19b813f4..beae029b13 100644 --- a/wp-includes/general-template.php +++ b/wp-includes/general-template.php @@ -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() ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index 65dfcdf974..fdce4ad6c3 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -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.