Changeset 5178
- Timestamp:
- 03/28/2017 05:02:15 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php
r5147 r5178 443 443 444 444 // Handle the old plugin tabs URLs. 445 add_rewrite_rule( '^([^/]+)/(installation|faq|screenshots|changelog|stats|developers|other_notes)/?$', 'index.php?redirect_plugin _tab=$matches[1]/#$matches[2]', 'top' );445 add_rewrite_rule( '^([^/]+)/(installation|faq|screenshots|changelog|stats|developers|other_notes)/?$', 'index.php?redirect_plugin=$matches[1]&redirect_plugin_tab=$matches[2]', 'top' ); 446 446 447 447 // If changing capabilities around, uncomment this. … … 950 950 public function filter_query_vars( $vars ) { 951 951 $vars[] = 'favorites_user'; 952 $vars[] = 'redirect_plugin'; 952 953 $vars[] = 'redirect_plugin_tab'; 953 954 $vars[] = 'plugin_admin'; … … 1007 1008 function custom_redirects() { 1008 1009 // Handle a redirect for /$plugin/$tab_name/ to /$plugin/#$tab_name. 1009 if ( get_query_var( 'redirect_plugin _tab' ) ) {1010 wp_safe_redirect( site_url( get_query_var( 'redirect_plugin _tab' ) ) );1010 if ( get_query_var( 'redirect_plugin' ) && get_query_var( 'redirect_plugin_tab' ) ) { 1011 wp_safe_redirect( site_url( get_query_var( 'redirect_plugin' ) . '/#' . get_query_var( 'redirect_plugin_tab' ) ) ); 1011 1012 die(); 1012 1013 }
Note: See TracChangeset
for help on using the changeset viewer.