[wp-trac] [WordPress Trac] #19910: Appearance Improvements: Theme Customization Frame
WordPress Trac
wp-trac at lists.automattic.com
Sat May 5 05:19:09 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):
Question: Why is this code in the WP_Customize_Setting->preview()
function?
{{{
case 'option' :
if ( empty( $this->id_data[ 'keys' ] ) )
add_filter( 'pre_option_' . $this->id_data[ 'base' ],
array( $this, '_preview_filter' ) );
else
add_filter( 'option_' . $this->id_data[ 'base' ], array(
$this, '_preview_filter' ) );
break;
}}}
I mean, I get the case, but I'm not sure of the reason for the diff
between the existence of the pre_ vs. non-pre_ filter. If the customizer
is just overriding values, shouldn't all of them go through the pre_
filter? I mean, we're not filtering the existing data, we're replacing it.
Since the option data is loaded into the customizer in advance, replacing
"all" should work, right? Or am I missing a case? Perhaps default cases
need to be considered?
--
Ticket URL: <http://core.trac.wordpress.org/ticket/19910#comment:21>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list