WordPress at Your Fingertips
function is not described

WP_Comments_List_Table::get_columns() public WP 1.0

{} It's a method of the class: WP_Comments_List_Table{}

No Hooks.

Return

Array.

Usage

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

Notes

  • Global. Int. $post_id

Code of WP_Comments_List_Table::get_columns() WP 5.8.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;
}