Making WordPress.org

Changeset 8192


Ignore:
Timestamp:
02/04/2019 05:38:30 AM (7 years ago)
Author:
dd32
Message:

Plugin Directory: Update the function that determines the current URL to reflect bugs found while implementing it for the Theme Directory.

  • is_tax() doesn't cover is_tag() or is_category()`. Neither are linked to, but they do exist in the background.
  • is_author() isn't used by the Plugin Directory (A taxonomy handles author/%) and this branch will fatal if run.

See #4067.

File:
1 edited

Legend:

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

    r8188 r8192  
    938938        $link = false;
    939939
    940         if ( is_tax() ) {
     940        if ( is_tax() || is_tag() || is_category() ) {
    941941            $link = get_term_link( $queried_object );
    942         } elseif ( is_author() ) {
    943             $link = get_author_link( $queried_object );
    944942        } elseif ( is_singular() ) {
    945943            $link = get_permalink( $queried_object );
Note: See TracChangeset for help on using the changeset viewer.