mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Revert the rememeber last view for comments page code as it is confusing.
git-svn-id: http://svn.automattic.com/wordpress/trunk@11231 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
f0c4dc3058
commit
ac3b739302
@ -85,14 +85,9 @@ require_once('admin-header.php');
|
||||
|
||||
$mode = ( ! isset($_GET['mode']) || empty($_GET['mode']) ) ? 'detail' : esc_attr($_GET['mode']);
|
||||
|
||||
$default_status = get_user_option('edit_comments_last_view');
|
||||
if ( empty($default_status) )
|
||||
$default_status = 'all';
|
||||
$comment_status = isset($_REQUEST['comment_status']) ? $_REQUEST['comment_status'] : $default_status;
|
||||
$comment_status = isset($_REQUEST['comment_status']) ? $_REQUEST['comment_status'] : 'all';
|
||||
if ( !in_array($comment_status, array('all', 'moderated', 'approved', 'spam')) )
|
||||
$comment_status = 'all';
|
||||
if ( $comment_status != $default_status )
|
||||
update_usermeta($current_user->ID, 'edit_comments_last_view', $comment_status);
|
||||
|
||||
$comment_type = !empty($_GET['comment_type']) ? esc_attr($_GET['comment_type']) : '';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user