WP_Comments_List_Table::display

Advertisement

Summery Summery

Displays the comments table.

Syntax Syntax

WP_Comments_List_Table::display()

Description Description

Overrides the parent display() method to render extra comments.

Source Source

File: wp-admin/includes/class-wp-comments-list-table.php

				if ( get_comments(
					array(
						'number' => 1,
						'type'   => $type,
					)
				) ) {
					printf(
						"\t<option value='%s'%s>%s</option>\n",
						esc_attr( $type ),
						selected( $comment_type, $type, false ),
						esc_html( $label )
					);
				}
			}
				echo '</select>';
		}
	}

	/**
	 * @return array
	 */
	protected function get_sortable_columns() {
		return array(
			'author'   => 'comment_author',
			'response' => 'comment_post_ID',
			'date'     => 'comment_date',
		);
	}

	/**
	 * Get the name of the default primary column.
	 *
	 * @since 4.3.0
	 *
	 * @return string Name of the default primary column, in this case, 'comment'.
	 */
	protected function get_default_primary_column_name() {
		return 'comment';
	}

	/**
	 * Displays the comments table.
	 *

Advertisement

Changelog Changelog

Changelog
Version Description
3.1.0 Introduced.

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.