Remember last view for plugins page. see #9527
git-svn-id: https://develop.svn.wordpress.org/trunk@11034 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
eef3fe8028
commit
40a49d7481
@ -20,9 +20,14 @@ else
|
||||
|
||||
$plugin = isset($_REQUEST['plugin']) ? $_REQUEST['plugin'] : '';
|
||||
|
||||
$status = isset($_REQUEST['plugin_status']) ? $_REQUEST['plugin_status'] : 'all';
|
||||
$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', 'recent', 'upgrade', 'search')) )
|
||||
$status = 'all';
|
||||
if ( $status != $default_status )
|
||||
update_usermeta($current_user->ID, 'plugins_last_view', $status);
|
||||
|
||||
$page = isset($_REQUEST['paged']) ? $_REQUEST['paged'] : 1;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user