Making WordPress.org

Changeset 8191


Ignore:
Timestamp:
02/04/2019 05:33:09 AM (6 years ago)
Author:
dd32
Message:

Theme Directory: Properly create canonical links for Author Archives.

See #4067.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/theme-directory.php

    r8190 r8191  
    12001200        // The browse/% urls on the Theme directory are front-page-query alterations.
    12011201        $link = home_url( 'browse/' . get_query_var( 'browse' ) . '/' );
     1202    } elseif ( is_author() ) {
     1203        // On WordPress.org get_author_posts_url() returns profile.wordpress.org links. Build it manually.
     1204        $link = home_url( 'author/' . $queried_object->user_nicename . '/' );
    12021205    } elseif ( is_tax() || is_tag() || is_category() ) {
    12031206        $link = get_term_link( $queried_object );
    1204     } elseif ( is_author() ) {
    1205         // $link = get_author_link( $queried_object );
    12061207    } elseif ( is_singular() ) {
    12071208        $link = get_permalink( $queried_object );
Note: See TracChangeset for help on using the changeset viewer.