Make WordPress Core

Changeset 35700


Ignore:
Timestamp:
11/19/2015 12:05:37 AM (11 years ago)
Author:
obenland
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/general-template.php

    r35624 r35700  
    873873
    874874        // If on an author archive, use the author's display name.
    875         } elseif ( is_author() && $author = get_queried_object() ) {
    876                 $title['title'] = $author->display_name;
     875        } elseif ( is_author() ) {
     876                $title['title'] = get_the_author();
    877877
    878878        // If on a post type archive, use the post type archive title.
Note: See TracChangeset for help on using the changeset viewer.