Make WordPress Core

Ticket #12064: 12064.diff

File 12064.diff, 707 bytes (added by nacin, 14 years ago)
  • wp-includes/theme.php

     
    710710 * @return string
    711711 */
    712712function get_author_template() {
    713         return get_query_template('author');
     713        $author_id = absint( get_query_var( 'author' ) );
     714        $author = get_user_by( 'id', $author_id )->user_nicename;
     715
     716        $templates = array();
     717
     718        if ( $author )
     719                $templates[] = "author-{$author}.php";
     720        if ( $author_id )
     721                $templates[] = "author-{$author_id}.php";
     722        $templates[] = 'author.php';
     723
     724        $template = locate_template( $templates );
     725        return apply_filters( 'author_template', $template );
    714726}
    715727
    716728/**