WP_Screen::get_columns() – Gets the number of layout columns the user has selected.

You appear to be a bot. Output may be restricted

Description

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.

Usage

$int = WP_Screen::get_columns();

Parameters

Returns

int Number of columns to display.

Source

File name: wordpress/wp-admin/includes/class-wp-screen.php
Lines:

1 to 3 of 3
  public function get_columns() {
    return $this->columns;
  }
 

 View on GitHub View on Trac