diff --git a/wp-admin/plugins.php b/wp-admin/plugins.php index 317632c86f..f386584ae7 100644 --- a/wp-admin/plugins.php +++ b/wp-admin/plugins.php @@ -11,10 +11,8 @@ require_once('admin.php'); if ( isset($_POST['clear-recent-list']) ) $action = 'clear-recent-list'; -elseif ( isset($_GET['action']) ) - $action = $_GET['action']; -elseif ( isset($_POST['action']) ) - $action = $_POST['action']; +elseif ( isset($_REQUEST['action']) ) + $action = $_REQUEST['action']; else $action = false; @@ -31,6 +29,9 @@ if ( $status != $default_status && 'search' != $status ) $page = isset($_REQUEST['paged']) ? $_REQUEST['paged'] : 1; +//Clean up request URI from temporary args for screen options/paging uri's to work as expected. +$_SERVER['REQUEST_URI'] = remove_query_arg(array('error', 'deleted', 'activate', 'activate-multi', 'deactivate', 'deactivate-multi', '_error_nonce'), $_SERVER['REQUEST_URI']); + if ( !empty($action) ) { switch ( $action ) { case 'activate': @@ -163,7 +164,9 @@ if ( !empty($action) ) { } //Endif verify-delete $delete_result = delete_plugins($plugins); - wp_cache_delete('plugins', 'plugins'); + set_transient('plugins_delete_result_'.$user_ID, $delete_result); //Store the result in a cache rather than a URL param due to object type & length + wp_redirect("plugins.php?deleted=true&plugin_status=$status&paged=$page"); + exit; break; case 'clear-recent-list': update_option('recently_activated', array()); @@ -198,7 +201,10 @@ if ( !empty($invalid) ) } ?> -
get_error_message() ); ?>