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:
parent
3f2c4fa8d2
commit
b875cd1b72
|
@ -872,8 +872,8 @@ function wp_get_document_title() {
|
||||||
$title['title'] = sprintf( __( 'Search Results for “%s”' ), get_search_query() );
|
$title['title'] = sprintf( __( 'Search Results for “%s”' ), get_search_query() );
|
||||||
|
|
||||||
// If on an author archive, use the author's display name.
|
// If on an author archive, use the author's display name.
|
||||||
} elseif ( is_author() && $author = get_queried_object() ) {
|
} elseif ( is_author() ) {
|
||||||
$title['title'] = $author->display_name;
|
$title['title'] = get_the_author();
|
||||||
|
|
||||||
// If on a post type archive, use the post type archive title.
|
// If on a post type archive, use the post type archive title.
|
||||||
} elseif ( is_post_type_archive() ) {
|
} elseif ( is_post_type_archive() ) {
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @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.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue