[wp-trac] [WordPress Trac] #19910: Appearance Improvements: Theme Customization Frame

WordPress Trac wp-trac at lists.automattic.com
Sat May 5 15:08:26 UTC 2012


#19910: Appearance Improvements: Theme Customization Frame
-------------------------------------+--------------------------
 Reporter:  koopersmith              |       Owner:  koopersmith
     Type:  task (blessed)           |      Status:  accepted
 Priority:  normal                   |   Milestone:  3.4
Component:  Appearance               |     Version:  3.3.1
 Severity:  normal                   |  Resolution:
 Keywords:  dev-feedback needs-docs  |
-------------------------------------+--------------------------

Comment (by Otto42):

 I understand why the use of pre_option vs. option now (serialized data vs.
 non-serialized data), however the use of option_ in this case causes the
 settings preview to not work when the row of settings does not exist in
 the database at all.

 Basically, if the entire option row doesn't exist, then get_option will
 return the $default value, without applying the option_whatever filter to
 it, so the preview doesn't reflect the changes made.

 I considered a few alternatives, but I think that actually applying the
 option_$option filter to the default options will cause breakage in some
 plugins somewhere, and so it's not a viable patch. So instead, I've
 created a "default_option_$option" filter, which specifically filters only
 the default options returned. By applying the customizer preview filters
 to that as well, this problem is fixed.

 Potential patch attached.

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


More information about the wp-trac mailing list