[wp-trac] [WordPress Trac] #9384: Enhance screen_layout(); functionality

WordPress Trac wp-trac at lists.automattic.com
Tue Mar 24 03:32:30 GMT 2009


#9384: Enhance screen_layout(); functionality
-------------------------+--------------------------------------------------
 Reporter:  ptahdunbar   |       Owner:       
     Type:  enhancement  |      Status:  new  
 Priority:  normal       |   Milestone:  2.8  
Component:  UI           |     Version:  2.7.1
 Severity:  normal       |    Keywords:       
-------------------------+--------------------------------------------------
 Currently in WordPress 2.7, and probably earlier, layout columns are only
 customizable for the dashboard (and the write pages if you remove the
 comments). How about we enhance this function to allow any page to
 customize their columns if needed. I have no idea on how to do this
 though.


 {{{
 function screen_layout($screen) {
         global $screen_layout_columns;

         if ( 'dashboard' == $screen ) {
                 $screen_layout_columns =
 get_user_option('screen_layout_dashboard');
                 $num = 4;
 /* add to the write pages?
         } elseif ( in_array( $screen, array('post', 'page', 'link') ) ) {
                 $screen_layout_columns =
 get_user_option('screen_layout_write');
                 $num = 2;
 */
         } else {
                 $screen_layout_columns = 0;
                 return '';
         }

         if ( ! $screen_layout_columns )
                         $screen_layout_columns = 2;
  // etc...
 }}}


 As a temporarily hack, I added another elseif statement to check for a
 certain page (so the user can customize the columns), then assigned $num =
 4;

 That works, but it doesn't retrieve the save columns from before since it
 requires the use of get_user_option() and I haven't tried to add that.

 Regardless, adding a filter in there (or whatever you need to do in order
 to make this work) would be awesome.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/9384>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list