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
1859 }
1860
1861 function screen_layout($screen) {
1862      global $screen_layout_columns, $wp_current_screen_options;
1863
1864      if ( is_string($screen) )
1865           $screen = convert_to_screen($screen);
1866
1867      // Back compat for plugins using the filter instead of add_screen_option()
1868      $columns = apply_filters('screen_layout_columns', array(), $screen->id, $screen);
1869      if ( !empty($columns) && isset($columns[$screen->id]) )
1870           add_screen_option('layout_columns', array('max' => $columns[$screen->id]) );
1871
1872      if ( !isset($wp_current_screen_options['layout_columns']) ) {
1873           $screen_layout_columns = 0;
1874           return '';
1875      }
1876
1877      $screen_layout_columns = get_user_option("screen_layout_$screen->id");