diff --git a/wp-admin/includes/plugin.php b/wp-admin/includes/plugin.php index 79f81232d1..a87810d514 100644 --- a/wp-admin/includes/plugin.php +++ b/wp-admin/includes/plugin.php @@ -215,7 +215,7 @@ function is_plugin_active($plugin) { */ function activate_plugin($plugin, $redirect = '') { $current = get_option('active_plugins'); - $plugin = trim($plugin); + $plugin = plugin_basename(trim($plugin)); $valid = validate_plugin($plugin); if ( is_wp_error($valid) ) @@ -254,6 +254,7 @@ function deactivate_plugins($plugins, $silent= false) { $plugins = array($plugins); foreach ( $plugins as $plugin ) { + $plugin = plugin_basename($plugin); if( ! is_plugin_active($plugin) ) continue; array_splice($current, array_search( $plugin, $current), 1 ); // Fixed Array-fu!