[wp-trac] [WordPress Trac] #20506: Undefined variable $screen_layout_columns when filtering out screen options

WordPress Trac wp-trac at lists.automattic.com
Mon Apr 23 19:56:58 UTC 2012


#20506: Undefined variable $screen_layout_columns when filtering out screen options
------------------------------------+--------------------
 Reporter:  griffinjt               |       Owner:
     Type:  defect (bug)            |      Status:  new
 Priority:  normal                  |   Milestone:  3.4
Component:  Warnings/Notices        |     Version:  3.3.1
 Severity:  normal                  |  Resolution:
 Keywords:  has-patch dev-feedback  |
------------------------------------+--------------------

Comment (by nacin):

 {{{
 echo get_current_screen()->get_user_option( 'layout_columns', 'auto' );
 }}}

 The one issue with that is the second argument is $default in this case,
 which is not unusual. (get_option() works the same way.) But it would be
 inconsistent with the WP_Screen::get_option() method, whose second
 argument is a specific array key of the requested option, rather than a
 default. I'm now kicking myself for that.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/20506#comment:5>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list