Add filters for the default to get_option() and get_site_option(). Provide default overrides in the customizer. Props Otto42. see #20448

git-svn-id: https://develop.svn.wordpress.org/trunk@20783 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2012-05-14 16:45:32 +00:00
parent 7e2e034b64
commit 7e4b88ad24
2 changed files with 7 additions and 1 deletions
+3 -1
View File
@@ -68,8 +68,10 @@ class WP_Customize_Setting {
case 'option' :
if ( empty( $this->id_data[ 'keys' ] ) )
add_filter( 'pre_option_' . $this->id_data[ 'base' ], array( $this, '_preview_filter' ) );
else
else {
add_filter( 'option_' . $this->id_data[ 'base' ], array( $this, '_preview_filter' ) );
add_filter( 'default_option_' . $this->id_data[ 'base' ], array( $this, '_preview_filter' ) );
}
break;
default :
do_action( 'customize_preview_' . $this->id );