Make WordPress Core


Ignore:
Timestamp:
09/16/2015 06:52:35 AM (11 years ago)
Author:
wonderboymusic
Message:

Move WP_Post_Comments_List_Table to its own file.

See #33413.

File:
1 edited

Legend:

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

    r34015 r34223  
    11<?php
    22/**
    3  * Comments and Post Comments List Table classes.
     3 * Comments List Table class.
    44 *
    55 * @package WordPress
     
    736736        }
    737737}
    738 
    739 /**
    740  * Post Comments List Table class.
    741  *
    742  * @package WordPress
    743  * @subpackage List_Table
    744  * @since 3.1.0
    745  * @access private
    746  *
    747  * @see WP_Comments_Table
    748  */
    749 class WP_Post_Comments_List_Table extends WP_Comments_List_Table {
    750 
    751         /**
    752          *
    753          * @return array
    754          */
    755         protected function get_column_info() {
    756                 return array(
    757                         array(
    758                                 'author'   => __( 'Author' ),
    759                                 'comment'  => _x( 'Comment', 'column name' ),
    760                         ),
    761                         array(),
    762                         array(),
    763                         'comment',
    764                 );
    765         }
    766 
    767         /**
    768          *
    769          * @return array
    770          */
    771         protected function get_table_classes() {
    772                 $classes = parent::get_table_classes();
    773                 $classes[] = 'wp-list-table';
    774                 $classes[] = 'comments-box';
    775                 return $classes;
    776         }
    777 
    778         /**
    779          *
    780          * @param bool $output_empty
    781          */
    782         public function display( $output_empty = false ) {
    783                 $singular = $this->_args['singular'];
    784 
    785                 wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' );
    786 ?>
    787 <table class="<?php echo implode( ' ', $this->get_table_classes() ); ?>" style="display:none;">
    788         <tbody id="the-comment-list"<?php
    789                 if ( $singular ) {
    790                         echo " data-wp-lists='list:$singular'";
    791                 } ?>>
    792                 <?php if ( ! $output_empty ) {
    793                         $this->display_rows_or_placeholder();
    794                 } ?>
    795         </tbody>
    796 </table>
    797 <?php
    798         }
    799 
    800         /**
    801          *
    802          * @param bool $comment_status
    803          * @return int
    804          */
    805         public function get_per_page( $comment_status = false ) {
    806                 return 10;
    807         }
    808 }
Note: See TracChangeset for help on using the changeset viewer.