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. git-svn-id: https://develop.svn.wordpress.org/trunk@35700 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
63d9d27e57
commit
17ba0ec012
@ -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() ) {
|
||||
|
Loading…
Reference in New Issue
Block a user