WP_Comments_List_Table::get_columns
Gets the list of columns.
Method of the class: WP_Comments_List_Table{}
No Hooks.
Returns
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_idThe ID of the post comments are being shown for.
WP_Comments_List_Table::get_columns() WP Comments List Table::get columns code WP 7.0
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;
}