Making WordPress.org

Changeset 9651


Ignore:
Timestamp:
03/31/2020 04:15:53 AM (7 years ago)
Author:
dd32
Message:

Plugin Directory: Output no-index robot tags for taxonomies with 3 or fewer items.

Fixes #4543.

File:
1 edited

Legend:

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

    r9486 r9651  
    152152         */
    153153        public static function output_meta() {
     154                global $wp_query;
     155
    154156                $metas   = [];
    155157                $noindex = false;
    … …  
    168170                                $noindex = true;
    169171                        }
     172                } elseif ( is_tax() && $wp_query->found_posts <= 3 ) {
     173                        $noindex = true;
    170174                }
    171175
Note: See TracChangeset for help on using the changeset viewer.