Stop remembering the last viewed plugins screen. Always show all plugins when returning to plugins.php. fixes #18810.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18811 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
fc7fb8b03e
commit
e296e48b3d
|
@ -12,15 +12,9 @@ class WP_Plugins_List_Table extends WP_List_Table {
|
|||
function __construct() {
|
||||
global $status, $page;
|
||||
|
||||
$default_status = get_user_option( 'plugins_last_view' );
|
||||
if ( empty( $default_status ) )
|
||||
$default_status = 'all';
|
||||
$status = isset( $_REQUEST['plugin_status'] ) ? $_REQUEST['plugin_status'] : $default_status;
|
||||
if ( !in_array( $status, array( 'all', 'active', 'inactive', 'recently_activated', 'upgrade', 'network', 'mustuse', 'dropins', 'search' ) ) )
|
||||
$status = 'all';
|
||||
if ( $status != $default_status && 'search' != $status )
|
||||
update_user_meta( get_current_user_id(), 'plugins_last_view', $status );
|
||||
|
||||
$status = 'all';
|
||||
if ( isset( $_REQUEST['plugin_status'] ) && in_array( $_REQUEST['plugin_status'], array( 'active', 'inactive', 'recently_activated', 'upgrade', 'network', 'mustuse', 'dropins', 'search' ) ) )
|
||||
$status = $_REQUEST['plugin_status'];
|
||||
|
||||
if ( isset($_REQUEST['s']) )
|
||||
$_SERVER['REQUEST_URI'] = add_query_arg('s', stripslashes($_REQUEST['s']) );
|
||||
|
|
Loading…
Reference in New Issue