Do not unslash variables reset by wp_reset_vars(). Remove variables that have never been used in plugin-editor.php. see #21767.
git-svn-id: https://develop.svn.wordpress.org/trunk@23419 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
2d34b9a876
commit
36d09ab2ef
@ -20,7 +20,7 @@ if ( !current_user_can('edit_plugins') )
|
||||
$title = __("Edit Plugins");
|
||||
$parent_file = 'plugins.php';
|
||||
|
||||
wp_reset_vars(array('action', 'redirect', 'profile', 'error', 'warning', 'a', 'file', 'plugin'));
|
||||
wp_reset_vars( array( 'action', 'error', 'file', 'plugin' ) );
|
||||
|
||||
$plugins = get_plugins();
|
||||
|
||||
@ -39,8 +39,6 @@ $plugin_files = get_plugin_files($plugin);
|
||||
|
||||
if ( empty($file) )
|
||||
$file = $plugin_files[0];
|
||||
else
|
||||
$file = wp_unslash($file);
|
||||
|
||||
$file = validate_file_to_edit($file, $plugin_files);
|
||||
$real_file = WP_PLUGIN_DIR . '/' . $file;
|
||||
|
@ -68,7 +68,7 @@ if ( empty( $file ) ) {
|
||||
$relative_file = 'style.css';
|
||||
$file = $allowed_files['style.css'];
|
||||
} else {
|
||||
$relative_file = wp_unslash( $file );
|
||||
$relative_file = $file;
|
||||
$file = $theme->get_stylesheet_directory() . '/' . $relative_file;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user