Making WordPress.org


Ignore:
Timestamp:
06/22/2016 02:39:38 PM (9 years ago)
Author:
dd32
Message:

Plugin Directory: Add a custom /search/ rewrite rule that is matched prior to our old-plugins-tabs redirect rule so that /search/stats/ continues to work.

See #1584

File:
1 edited

Legend:

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

    r3521 r3547  
    237237        add_rewrite_rule( '^browse/favorites/([^/]+)$', 'index.php?browse=favorites&favorites_user=$matches[1]', 'top' );
    238238
     239        // Add duplicate search rule which will be hit before the following old-plugin tab rules
     240        add_rewrite_rule( '^search/(.+)/?$', 'index.php?s=$matches[1]', 'top' );
     241
    239242        // Handle the old plugin tabs URLs.
    240         add_rewrite_rule( '^([^/]+)/(installation|faq|screenshots|changelog|stats|developers|other_notes)$', 'index.php?redirect_plugin_tab=$matches[1]/#$matches[2]', 'top' );
     243        add_rewrite_rule( '^([^/]+)/(installation|faq|screenshots|changelog|stats|developers|other_notes)/?$', 'index.php?redirect_plugin_tab=$matches[1]/#$matches[2]', 'top' );
    241244
    242245        // If changing capabilities around, uncomment this.
Note: See TracChangeset for help on using the changeset viewer.