WordPress.org

Make WordPress Core


Ignore:
Timestamp:
02/05/2016 06:49:46 PM (4 years ago)
Author:
boonebgorges
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-comments-list-table.php

    r36387 r36480  
    3434     * @see WP_List_Table::__construct() for more information on default arguments.
    3535     *
    36      * @global int|bool $post_id
     36     * @global int $post_id
    3737     *
    3838     * @param array $args An associative array of arguments.
     
    4141        global $post_id;
    4242
    43         $post_id = isset( $_REQUEST['p'] ) ? absint( $_REQUEST['p'] ) : false;
     43        $post_id = isset( $_REQUEST['p'] ) ? absint( $_REQUEST['p'] ) : 0;
    4444
    4545        if ( get_option( 'show_avatars' ) ) {
     
    7070    /**
    7171     *
    72      * @global int|bool $post_id
     72     * @global int    $post_id
    7373     * @global string $comment_status
    7474     * @global string $search
     
    193193    /**
    194194     *
    195      * @global int|bool $post_id
     195     * @global int $post_id
    196196     * @global string $comment_status
    197197     * @global string $comment_type
     
    384384    /**
    385385     *
    386      * @global int|bool $post_id
     386     * @global int $post_id
    387387     *
    388388     * @return array
Note: See TracChangeset for help on using the changeset viewer.