In WP_Media_List_Table
, rename $pending_count
to $comment_pending_count
and mark it as protected, for consistency with WP_Posts_List_Table
.
See #11381. git-svn-id: https://develop.svn.wordpress.org/trunk@35222 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
ea8e9f89cd
commit
e4c9f97fb3
@ -9,13 +9,13 @@
|
|||||||
*/
|
*/
|
||||||
class WP_Media_List_Table extends WP_List_Table {
|
class WP_Media_List_Table extends WP_List_Table {
|
||||||
/**
|
/**
|
||||||
* Store the pending comment count for each post
|
* Holds the number of pending comments for each post.
|
||||||
*
|
*
|
||||||
* @access public
|
|
||||||
* @since 4.4.0
|
* @since 4.4.0
|
||||||
* @var array
|
* @var array
|
||||||
|
* @access protected
|
||||||
*/
|
*/
|
||||||
public $pending_count = array();
|
protected $comment_pending_count = array();
|
||||||
|
|
||||||
private $detached;
|
private $detached;
|
||||||
|
|
||||||
@ -505,8 +505,8 @@ class WP_Media_List_Table extends WP_List_Table {
|
|||||||
public function column_comments( $post ) {
|
public function column_comments( $post ) {
|
||||||
echo '<div class="post-com-count-wrapper">';
|
echo '<div class="post-com-count-wrapper">';
|
||||||
|
|
||||||
if ( isset( $this->pending_count[ $post->ID ] ) ) {
|
if ( isset( $this->comment_pending_count[ $post->ID ] ) ) {
|
||||||
$pending_comments = $this->pending_count[ $post->ID ];
|
$pending_comments = $this->comment_pending_count[ $post->ID ];
|
||||||
} else {
|
} else {
|
||||||
$pending_comments = get_pending_comments_num( $post->ID );
|
$pending_comments = get_pending_comments_num( $post->ID );
|
||||||
}
|
}
|
||||||
@ -582,7 +582,7 @@ class WP_Media_List_Table extends WP_List_Table {
|
|||||||
$post_ids = wp_list_pluck( $wp_query->posts, 'ID' );
|
$post_ids = wp_list_pluck( $wp_query->posts, 'ID' );
|
||||||
reset( $wp_query->posts );
|
reset( $wp_query->posts );
|
||||||
|
|
||||||
$this->pending_count = get_pending_comments_num( $post_ids );
|
$this->comment_pending_count = get_pending_comments_num( $post_ids );
|
||||||
|
|
||||||
add_filter( 'the_title','esc_html' );
|
add_filter( 'the_title','esc_html' );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user