Making WordPress.org


Ignore:
Timestamp:
02/24/2020 11:44:33 PM (2 years ago)
Author:
dd32
Message:

Theme Directory: Redirect /themes/browse/featured to the homepage temporarily as we had incorrectly set it as the Canonical URL for the Theme directory.

See #5044.
Fixes #5048.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-themes/functions.php

    r9533 r9535  
    7676        );
    7777        wp_safe_redirect( $url, 301 );
     78        die();
     79    }
     80
     81    // Redirect /browse/featured/ to the front-page temporarily, as it's showing in Google results.
     82    if ( '/themes/browse/featured' === substr( $path, 0, 23 ) ) {
     83        wp_safe_redirect( home_url( '/' ), 302 );
    7884        die();
    7985    }
     
    137143                    'nonce'  => is_user_logged_in() ? wp_create_nonce( 'modify-theme-favorite' ) : false,
    138144                ),
    139                 'browseDefault'=> 'popular',
     145                'browseDefault'=> WPORG_THEMES_DEFAULT_BROWSE,
    140146            ),
    141147            'l10n' => array(
Note: See TracChangeset for help on using the changeset viewer.