WP_Comments_List_Table::get_columns()publicWP 1.0

Метод класса: WP_Comments_List_Table{}

Хуков нет.

Возвращает

Строку[]. Array of column titles keyed by their column name.

Использование

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

Заметки

  • Global. int. $post_id

Код WP_Comments_List_Table::get_columns() WP 6.4.3

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;
}