WP_Post_Comments_List_Table

Core class used to implement displaying post comments in a list table.

Defined (1)

The class is defined in the following location(s).

/wp-admin/includes/class-wp-post-comments-list-table.php  
  1. class WP_Post_Comments_List_Table extends WP_Comments_List_Table { 
  2.  
  3. /** 
  4. * @return array 
  5. */ 
  6. protected function get_column_info() { 
  7. return array( 
  8. array( 
  9. 'author' => __( 'Author' ),  
  10. 'comment' => _x( 'Comment', 'column name' ),  
  11. ),  
  12. array(),  
  13. array(),  
  14. 'comment',  
  15. ); 
  16.  
  17. /** 
  18. * @return array 
  19. */ 
  20. protected function get_table_classes() { 
  21. $classes = parent::get_table_classes(); 
  22. $classes[] = 'wp-list-table'; 
  23. $classes[] = 'comments-box'; 
  24. return $classes; 
  25.  
  26. /** 
  27. * @param bool $output_empty 
  28. */ 
  29. public function display( $output_empty = false ) { 
  30. $singular = $this->_args['singular']; 
  31.  
  32. wp_nonce_field( "fetch-list-" . get_class( $this ), '_ajax_fetch_list_nonce' ); 
  33. ?> 
  34. <table class="<?php echo implode( ' ', $this->get_table_classes() ); ?>" style="display:none;"> 
  35. <tbody id="the-comment-list"<?php 
  36. if ( $singular ) { 
  37. echo " data-wp-lists='list:$singular'"; 
  38. } ?>> 
  39. <?php if ( ! $output_empty ) { 
  40. $this->display_rows_or_placeholder(); 
  41. } ?> 
  42. </tbody> 
  43. </table> 
  44. <?php 
  45.  
  46. /** 
  47. * @param bool $comment_status 
  48. * @return int 
  49. */ 
  50. public function get_per_page( $comment_status = false ) { 
  51. return 10;