[wp-trac] [WordPress Trac] #20448: Update Twenty Ten and Twenty Eleven to use 3.4 features

WordPress Trac wp-trac at lists.automattic.com
Mon May 7 12:20:35 UTC 2012


#20448: Update Twenty Ten and Twenty Eleven to use 3.4 features
----------------------------+--------------------------
 Reporter:  nacin           |       Owner:  koopersmith
     Type:  task (blessed)  |      Status:  reviewing
 Priority:  high            |   Milestone:  3.4
Component:  Bundled Theme   |     Version:  3.4
 Severity:  major           |  Resolution:
 Keywords:  has-patch       |
----------------------------+--------------------------

Comment (by kovshenin):

 Replying to [comment:19 andyadams]:
 > It looks like the customizer is expecting a value to be in the DB? This
 doesn't have to do with saving defaults in the database, does it?!?

 It seems that Customize is using a `pre_option_*` filter to short-circuit
 string options, but the `option_*` filter when it comes to arrays. Since
 the array is never stored in the database, the `option_*` filters are
 never reached because `get_option` will return the default without passing
 it through the filter. By simply replacing `return $default` with `$value
 = $default` in `get_option` I'm able to get the override of non-existing
 options to work, but I have a feeling this can break something else.

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


More information about the wp-trac mailing list