WordPress.org

Make WordPress Core

Changeset 35222


Ignore:
Timestamp:
10/16/2015 06:22:12 PM (4 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

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

    r34891 r35222  
    1010class WP_Media_List_Table extends WP_List_Table {
    1111    /**
    12      * Store the pending comment count for each post
    13      *
    14      * @access public
     12     * Holds the number of pending comments for each post.
     13     *
    1514     * @since 4.4.0
    1615     * @var array
    17      */
    18     public $pending_count = array();
     16     * @access protected
     17     */
     18    protected $comment_pending_count = array();
    1919
    2020    private $detached;
     
    506506        echo '<div class="post-com-count-wrapper">';
    507507
    508         if ( isset( $this->pending_count[ $post->ID ] ) ) {
    509             $pending_comments = $this->pending_count[ $post->ID ];
     508        if ( isset( $this->comment_pending_count[ $post->ID ] ) ) {
     509            $pending_comments = $this->comment_pending_count[ $post->ID ];
    510510        } else {
    511511            $pending_comments = get_pending_comments_num( $post->ID );
     
    583583        reset( $wp_query->posts );
    584584
    585         $this->pending_count = get_pending_comments_num( $post_ids );
     585        $this->comment_pending_count = get_pending_comments_num( $post_ids );
    586586
    587587        add_filter( 'the_title','esc_html' );
Note: See TracChangeset for help on using the changeset viewer.