Make WordPress Core


Ignore:
Timestamp:
04/30/2009 10:51:42 PM (17 years ago)
Author:
azaozz
Message:

Let plugins use screen layout columns, props arena, fixes #9606

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/template.php

    r11139 r11144  
    35873587        global $screen_layout_columns;
    35883588
    3589         switch ( $screen ) {
    3590                 case 'dashboard':
    3591                         $screen_layout_columns = get_user_option('screen_layout_dashboard');
    3592                         $num = 4;
    3593                         break;
    3594                 case 'post':
    3595                         $screen_layout_columns = get_user_option('screen_layout_post');
    3596                         $num = 2;
    3597                         break;
    3598                 case 'page':
    3599                         $screen_layout_columns = get_user_option('screen_layout_page');
    3600                         $num = 2;
    3601                         break;
    3602                 case 'link':
    3603                         $screen_layout_columns = get_user_option('screen_layout_link');
    3604                         $num = 2;
    3605                         break;
    3606                 default:
    3607                         $screen_layout_columns = 0;
    3608                         return '';
    3609         }
     3589        $columns = array('dashboard' => 4, 'post' => 2, 'page' => 2, 'link' => 2);
     3590        $columns = apply_filters('screen_layout_columns', $columns, $screen);
     3591
     3592        if ( !isset($columns[$screen]) ) {
     3593                $screen_layout_columns = 0;
     3594                return '';
     3595        }
     3596       
     3597        $screen_layout_columns = get_user_option("screen_layout_$screen");
     3598        $num = $columns[$screen];
    36103599
    36113600        if ( ! $screen_layout_columns )
Note: See TracChangeset for help on using the changeset viewer.