WP_Plugins_List_Table::get_columns │ public │ WP 3.1.0

Gets the list of columns for this list table.

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

Хуков нет.

Возвращает

array<string, string>. An associative array of column titles keyed by their column name.

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

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

Заметки

Global. Строка. $status Current plugin status filter slug.

Список изменений

С версии 3.1.0 Введена.

Код WP_Plugins_List_Table::get_columns() WP 7.1.2

public function get_columns() {
	global $status;

	$columns = array(
		'cb'          => ! in_array( $status, array( 'mustuse', 'dropins' ), true ) ? '<input type="checkbox" />' : '',
		'name'        => __( 'Plugin' ),
		'description' => __( 'Description' ),
	);

	if ( $this->show_autoupdates && ! in_array( $status, array( 'mustuse', 'dropins' ), true ) ) {
		$columns['auto-updates'] = __( 'Automatic Updates' );
	}

	return $columns;
}