In comments list table, $post_id
should default to false
rather than 0.
After [36381], the default value of `0` was causing the list table at edit-comments.php to be empty. `false` prevents this. This fix is likely temporary, while more research is done into the backward compatibility concerns tied to [36381]. See #35090. git-svn-id: https://develop.svn.wordpress.org/trunk@36387 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
41406e3c6e
commit
e1b5d2d2bf
@ -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 $post_id
|
||||
* @global int|bool $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'] ) : 0;
|
||||
$post_id = isset( $_REQUEST['p'] ) ? absint( $_REQUEST['p'] ) : false;
|
||||
|
||||
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 $post_id
|
||||
* @global int|bool $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 $post_id
|
||||
* @global int|bool $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 $post_id
|
||||
* @global int|bool $post_id
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user