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/plugins/theme-directory/theme-directory.php

    r9533 r9535  
    3434include __DIR__ . '/jobs/class-trac-sync.php';
    3535new WordPressdotorg\Theme_Directory\Jobs\Manager();
     36
     37define( 'WPORG_THEMES_DEFAULT_BROWSE', 'popular' );
    3638
    3739/**
     
    12851287    $link = false;
    12861288
    1287     if ( get_query_var( 'browse' ) ) {
     1289    if ( get_query_var( 'browse' ) && WPORG_THEMES_DEFAULT_BROWSE === get_query_var( 'browse' ) ) {
     1290        $link = home_url( '/' );
     1291    } elseif ( get_query_var( 'browse' ) ) {
    12881292        // The browse/% urls on the Theme directory are front-page-query alterations.
    12891293        $link = home_url( 'browse/' . get_query_var( 'browse' ) . '/' );
Note: See TracChangeset for help on using the changeset viewer.