[ Index ] |
PHP Cross Reference of WordPress |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * List Table API: WP_Post_Comments_List_Table class 4 * 5 * @package WordPress 6 * @subpackage Administration 7 * @since 4.4.0 8 */ 9 10 /** 11 * Core class used to implement displaying post comments in a list table. 12 * 13 * @since 3.1.0 14 * @access private 15 * 16 * @see WP_Comments_List_Table 17 */ 18 class WP_Post_Comments_List_Table extends WP_Comments_List_Table { 19 20 /** 21 * @return array 22 */ 23 protected function get_column_info() { 24 return array( 25 array( 26 'author' => __( 'Author' ), 27 'comment' => _x( 'Comment', 'column name' ), 28 ), 29 array(), 30 array(), 31 'comment', 32 ); 33 } 34 35 /** 36 * @return array 37 */ 38 protected function get_table_classes() { 39 $classes = parent::get_table_classes(); 40 $classes[] = 'wp-list-table'; 41 $classes[] = 'comments-box'; 42 return $classes; 43 } 44 45 /** 46 * @param bool $output_empty 47 */ 48 public function display( $output_empty = false ) { 49 $singular = $this->_args['singular']; 50 51 wp_nonce_field( 'fetch-list-' . get_class( $this ), '_ajax_fetch_list_nonce' ); 52 ?> 53 <table class="<?php echo implode( ' ', $this->get_table_classes() ); ?>" style="display:none;"> 54 <tbody id="the-comment-list" 55 <?php 56 if ( $singular ) { 57 echo " data-wp-lists='list:$singular'"; 58 } 59 ?> 60 > 61 <?php 62 if ( ! $output_empty ) { 63 $this->display_rows_or_placeholder(); 64 } 65 ?> 66 </tbody> 67 </table> 68 <?php 69 } 70 71 /** 72 * @param bool $comment_status 73 * @return int 74 */ 75 public function get_per_page( $comment_status = false ) { 76 return 10; 77 } 78 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Dec 22 01:00:02 2024 | Cross-referenced by PHPXref 0.7.1 |