Changeset 5248 for sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/class-plugin-directory.php
- Timestamp:
- 04/05/2017 04:50:33 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
r5217 r5248 440 440 441 441 // Handle plugin admin requests 442 add_rewrite_rule( '^([^/]+)/ad min/?$', 'index.php?name=$matches[1]&plugin_admin=1', 'top' );442 add_rewrite_rule( '^([^/]+)/advanced/?$', 'index.php?name=$matches[1]&plugin_advanced=1', 'top' ); 443 443 444 444 // Handle the old plugin tabs URLs. … … 961 961 $vars[] = 'redirect_plugin'; 962 962 $vars[] = 'redirect_plugin_tab'; 963 $vars[] = 'plugin_ad min';963 $vars[] = 'plugin_advanced'; 964 964 965 965 return $vars; … … 1050 1050 } 1051 1051 1052 // Browse 404's 1053 if ( 'browse' === $path[2] ) { 1054 wp_safe_redirect( home_url( '/browse/featured/' ) ); 1055 die(); 1056 } 1057 1052 1058 // Otherwise, handle a plugin redirect. 1053 1059 if ( $path[2] && ( $plugin = self::get_plugin_post( $path[2] ) ) ) { … … 1072 1078 } 1073 1079 1074 // Filter access to the plugin administration area. Only certain users are allowed access.1075 if ( get_query_var( 'plugin_admin' ) &&1076 ! current_user_can(1077 'plugin_admin_view',1078 $post = Plugin_Directory::get_plugin_post( get_query_var( 'name' ) )1079 )1080 ) {1081 wp_safe_redirect( get_permalink( $post ) );1082 die();1083 }1084 1080 } 1085 1081
Note: See TracChangeset
for help on using the changeset viewer.