public function prepare_items() { global $mode,
$post_id,
$comment_status,
$comment_type,
$search;
if ( !
empty( $_REQUEST['mode'
] ) ) { $mode = 'excerpt' ===
$_REQUEST['mode'
] ? 'excerpt' : 'list';
set_user_setting( 'posts_list_mode',
$mode );
} else { $mode =
get_user_setting( 'posts_list_mode', 'list'
);
} $comment_status =
isset( $_REQUEST['comment_status'
] ) ?
$_REQUEST['comment_status'
] : 'all';
if ( !
in_array( $comment_status, array
( 'all', 'mine', 'moderated', 'approved', 'spam', 'trash'
), true
) ) { $comment_status = 'all';
} $comment_type = !
empty( $_REQUEST['comment_type'
] ) ?
$_REQUEST['comment_type'
] : '';