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
3701      if ( is_string($screen) )
3702           $screen = convert_to_screen($screen);
3703
3704      $columns = array('dashboard' => 4, 'link' => 2);
3705
3706      // Add custom post types
3707      foreach ( get_post_types( array('show_ui' => true) ) as $post_type )
3708           $columns[$post_type] = 2;
3709
3710      $columns = apply_filters('screen_layout_columns', $columns, $screen->id, $screen);
3711
3712      if ( !isset($columns[$screen->id]) ) {
3713           $screen_layout_columns = 0;
3714           return '';
3715       }
3716
3717      $screen_layout_columns = get_user_option("screen_layout_$screen->id");
3718      $num = $columns[$screen->id];
3719