WP_Comments_List_Table::get_columns()publicWP 1.0

Method of the class: WP_Comments_List_Table{}

No Hooks.

Return

String[]. Array of column titles keyed by their column name.

Usage

$WP_Comments_List_Table = new WP_Comments_List_Table();
$WP_Comments_List_Table->get_columns();

Notes

  • Global. Int. $post_id

WP_Comments_List_Table::get_columns() code WP 6.5.2

public function get_columns() {
	global $post_id;

	$columns = array();

	if ( $this->checkbox ) {
		$columns['cb'] = '<input type="checkbox" />';
	}

	$columns['author']  = __( 'Author' );
	$columns['comment'] = _x( 'Comment', 'column name' );

	if ( ! $post_id ) {
		/* translators: Column name or table row header. */
		$columns['response'] = __( 'In response to' );
	}

	$columns['date'] = _x( 'Submitted on', 'column name' );

	return $columns;
}