mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Apply some bandaid to WP_Comments_Table::prepare_items() to cover more of the different ways we include post IDs in urls/ajax queries.
git-svn-id: http://svn.automattic.com/wordpress/trunk@15604 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6509fa203a
commit
6ba5cecaaa
@ -2029,7 +2029,14 @@ class WP_Comments_Table extends WP_List_Table {
|
||||
function prepare_items() {
|
||||
global $post_id, $comment_status, $search;
|
||||
|
||||
$post_id = isset( $_REQUEST['p'] ) ? absint( $_REQUEST['p'] ) : 0;
|
||||
if ( isset( $_REQUEST['p'] ) )
|
||||
$post_id = absint( $_REQUEST['p'] );
|
||||
elseif ( isset( $_REQUEST['post'] ) )
|
||||
$post_id = absint( $_REQUEST['post'] );
|
||||
elseif ( isset( $_REQUEST['post_ID'] ) )
|
||||
$post_id = absint( $_REQUEST['post_ID'] );
|
||||
else
|
||||
$post_id = 0;
|
||||
|
||||
$comment_status = isset( $_REQUEST['comment_status'] ) ? $_REQUEST['comment_status'] : 'all';
|
||||
if ( !in_array( $comment_status, array( 'all', 'moderated', 'approved', 'spam', 'trash' ) ) )
|
||||
|
Loading…
Reference in New Issue
Block a user