Comments: Restore the ability to bypass post_id filter using 0 or '0'.

The changes introduced in [36381], while logical and clearly awesome, introduce
the potential for much breakage. Those who want to query for comments with a
null `comment_post_ID` should use `'post_in' => array( 0 )` instead.

Reverts [36381], [36387].
See #35090.

Built from https://develop.svn.wordpress.org/trunk@36480


git-svn-id: http://core.svn.wordpress.org/trunk@36447 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Boone Gorges
2016-02-05 18:50:25 +00:00
parent 8e5cf1c2fe
commit b5d12e130c
3 changed files with 11 additions and 10 deletions
@@ -33,14 +33,14 @@ class WP_Comments_List_Table extends WP_List_Table {
*
* @see WP_List_Table::__construct() for more information on default arguments.
*
* @global int|bool $post_id
* @global int $post_id
*
* @param array $args An associative array of arguments.
*/
public function __construct( $args = array() ) {
global $post_id;
$post_id = isset( $_REQUEST['p'] ) ? absint( $_REQUEST['p'] ) : false;
$post_id = isset( $_REQUEST['p'] ) ? absint( $_REQUEST['p'] ) : 0;
if ( get_option( 'show_avatars' ) ) {
add_filter( 'comment_author', array( $this, 'floated_admin_avatar' ), 10, 2 );
@@ -69,7 +69,7 @@ class WP_Comments_List_Table extends WP_List_Table {
/**
*
* @global int|bool $post_id
* @global int $post_id
* @global string $comment_status
* @global string $search
* @global string $comment_type
@@ -192,7 +192,7 @@ class WP_Comments_List_Table extends WP_List_Table {
/**
*
* @global int|bool $post_id
* @global int $post_id
* @global string $comment_status
* @global string $comment_type
*/
@@ -383,7 +383,7 @@ class WP_Comments_List_Table extends WP_List_Table {
/**
*
* @global int|bool $post_id
* @global int $post_id
*
* @return array
*/