Making WordPress.org

Changeset 3453


Ignore:
Timestamp:
06/19/2016 09:11:06 AM (8 years ago)
Author:
dd32
Message:

Plugin Directory: Redirect ?s=term to /search/term/

See #1584

File:
1 edited

Legend:

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

    r3451 r3453  
    670670        if ( 'search.php' == get_query_var( 'name' ) && isset( $_GET['q'] ) ) {
    671671            wp_safe_redirect( site_url( '/search/' . urlencode( wp_unslash( $_GET['q'] ) ) . '/' ) );
     672            die();
     673        }
     674
     675        // new-style Search links
     676        if ( get_query_var( 's' ) && isset( $_GET['s'] ) ) {
     677            wp_safe_redirect( site_url( '/search/' . urlencode( get_query_var( 's' ) ) . '/' ) );
    672678            die();
    673679        }
Note: See TracChangeset for help on using the changeset viewer.