Menu Adam R Brown

WP hooks navigation: Home/browseActions indexFilters index

Source View: screen_layout_columns

To save our bandwidth, we show only a snippet of code around each occurence of the hook. View complete file in SVN (without highlighting).

Understanding Source Code

The best way to understand what a hook does is to look at where it occurs in the source code.

Remember, this hook may occur in more than one file. Moreover, the hook's context may change from version to version.

Source View

Line Code
1820 }
1821
1822 function screen_layout($screen) {
1823      global $screen_layout_columns, $wp_current_screen_options;
1824
1825      if ( is_string($screen) )
1826           $screen = convert_to_screen($screen);
1827
1828      // Back compat for plugins using the filter instead of add_screen_option()
1829      $columns = apply_filters('screen_layout_columns', array(), $screen->id, $screen);
1830      if ( !empty($columns) && isset($columns[$screen->id]) )
1831           add_screen_option('layout_columns', array('max' => $columns[$screen->id]) );
1832
1833      if ( !isset($wp_current_screen_options['layout_columns']) ) {
1834           $screen_layout_columns = 0;
1835           return '';
1836      }
1837
1838      $screen_layout_columns = get_user_option("screen_layout_$screen->id");