Making WordPress.org

Changeset 9911


Ignore:
Timestamp:
05/25/2020 01:27:34 AM (5 years ago)
Author:
dd32
Message:

Plugin Directory: The /browse/favorites route should be acessible even if it has no posts.

See #5226.

File:
1 edited

Legend:

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

    r9886 r9911  
    12981298
    12991299        // Existing tag with no plugins.
    1300         if ( is_tax() && ! $GLOBALS['wp_query']->have_posts() ) {
     1300        if (
     1301            ( is_tax() || is_category() || is_tag() ) &&
     1302            ! have_posts() &&
     1303            ! is_tax( 'plugin_section' ) // All sections have something, or intentionall don't (favorites)
     1304        ) {
    13011305            // [1] => plugins [2] => tags [3] => example-plugin-name [4..] => random().
    13021306            $path = explode( '/', $_SERVER['REQUEST_URI'] );
Note: See TracChangeset for help on using the changeset viewer.