mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
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:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user