WP_Screen::get_columns()publicWP 3.4.0

Gets the number of layout columns the user has selected.

The layout_columns option controls the max number and default number of columns. This method returns the number of columns within that range selected by the user via Screen Options. If no selection has been made, the default provisioned in layout_columns is returned. If the screen does not support selecting the number of layout columns, 0 is returned.

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

Хуков нет.


int. Number of columns to display.


$WP_Screen = new WP_Screen();

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

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

Код WP_Screen::get_columns() WP 6.5.2

public function get_columns() {
	return $this->columns;