WordPress.org

Making WordPress.org

Changeset 10084


Ignore:
Timestamp:
07/20/2020 06:41:35 AM (18 months ago)
Author:
dd32
Message:

Theme Directory: Noindex tag filtered views.

Fixes #5255.

File:
1 edited

Legend:

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

    r10021 r10084  
    11321132
    11331133/**
    1134  * Noindex outdated themes.
     1134 * SEO Tweaks
     1135 *  - noindex outdated themes.
     1136 *  - noindex filtered views.
    11351137 */
    11361138function wporg_themes_noindex_request( $noindex ) {
     
    11431145            }
    11441146        }
     1147    }
     1148
     1149    if ( is_tag() ) {
     1150        $noindex = true;
    11451151    }
    11461152
     
    13151321 * Filter the WordPress.org SEO plugin Canonical location to respect Theme Directory differences.
    13161322 */
    1317 function wporg_canonical_url( $url ) {
     1323function wporg_themes_canonical_url( $url ) {
    13181324    if ( get_query_var( 'browse' ) && WPORG_THEMES_DEFAULT_BROWSE === get_query_var( 'browse' ) ) {
    13191325        $url = home_url( '/' );
     
    13251331    return $url;
    13261332}
    1327 add_filter( 'wporg_canonical_url', 'wporg_canonical_url' );
     1333add_filter( 'wporg_canonical_url', 'wporg_themes_canonical_url' );
    13281334
    13291335// Theme Directory doesn't support pagination.
Note: See TracChangeset for help on using the changeset viewer.