Making WordPress.org


Ignore:
Timestamp:
09/03/2020 02:14:02 AM (4 years ago)
Author:
dd32
Message:

Plugin Directory: Search: When searches are performed from /browse/block/ limit the searches to the plugins in that section (block plugins).

This is mostly for debugging and to visually see any search modifications easier.

See https://github.com/WordPress/gutenberg/issues/24910
See #2753.

File:
1 edited

Legend:

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

    r10215 r10233  
    11911191        $vars[] = 'plugin_advanced';
    11921192        $vars[] = 'geopattern_icon';
     1193        $vars[] = 'block_search';
    11931194
    11941195        // Remove support for any query vars the Plugin Directory doesn't support/need.
     
    13381339        // New-style search links.
    13391340        if ( get_query_var( 's' ) && isset( $_GET['s'] ) ) {
    1340             wp_safe_redirect( site_url( '/search/' . urlencode( get_query_var( 's' ) ) . '/' ), 301 );
     1341            $url = site_url( '/search/' . urlencode( get_query_var( 's' ) ) . '/' );
     1342            if ( get_query_var( 'block_search' ) ) {
     1343                $url = add_query_arg( 'block_search', get_query_var( 'block_search' ), $url );
     1344            }
     1345
     1346            wp_safe_redirect( $url, 301 );
    13411347            die();
    13421348        }
Note: See TracChangeset for help on using the changeset viewer.