wppaste
WordPress

WP_Post_Comments_List_Table

Since
3.1.0
Source
wp-admin/includes/class-wp-post-comments-list-table.php:17
Core class used to implement displaying post comments in a list table.

Compatibility

WordPress
since 3.1.0
  • 6.7.7
  • 6.8.8
  • 6.9.7
  • 7.0.4
  • 7.1.0

Present in every tracked release (6.7.7 to 7.1.0).

Methods · 4

Source code

class WP_Post_Comments_List_Table extends WP_Comments_List_Table { 	/**	 * @return array	 */	protected function get_column_info() {		return array(			array(				'author'  => __( 'Author' ),				'comment' => _x( 'Comment', 'column name' ),			),			array(),			array(),			'comment',		);	} 	/**	 * @return array	 */	protected function get_table_classes() {		$classes   = parent::get_table_classes();		$classes[] = 'wp-list-table';		$classes[] = 'comments-box';		return $classes;	} 	/**	 * @param bool $output_empty	 */	public function display( $output_empty = false ) {		$singular = $this->_args['singular']; 		wp_nonce_field( 'fetch-list-' . get_class( $this ), '_ajax_fetch_list_nonce' );		?><table class="<?php echo implode( ' ', $this->get_table_classes() ); ?>" style="display:none;">	<tbody id="the-comment-list"		<?php		if ( $singular ) {			echo " data-wp-lists='list:$singular'";		}		?>		>		<?php		if ( ! $output_empty ) {			$this->display_rows_or_placeholder();		}		?>	</tbody></table>		<?php	} 	/**	 * @param bool $comment_status	 * @return int	 */	public function get_per_page( $comment_status = false ) {		return 10;	}}

Changelog

Introduced in 3.1.0. Unchanged from 6.7.7 through 7.1.0.

  1. 6.7.7
  2. 6.8.8
  3. 6.9.7
  4. 7.0.4
  5. 7.1.0

Signature, return type and hooks compared across 5 parsed releases.

About this page

Parsed data
Generated from the wordpress-develop 7.0.4 tag, from src/wp-admin/includes/class-wp-post-comments-list-table.php, and regenerated for each WordPress release so it tracks the code rather than a snapshot of it.
Corrections
Something wrong on this page? Report it and it gets fixed in the next regeneration.