WP_Comments_List_Table::get_columns()
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() WP Comments List Table::get columns code WP 6.8
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; }