WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/14/2012 04:45:32 PM (6 years ago)
Author:
ryan
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-wp-customize-setting.php

    r20645 r20783  
    6969                if ( empty( $this->id_data[ 'keys' ] ) )
    7070                    add_filter( 'pre_option_' . $this->id_data[ 'base' ], array( $this, '_preview_filter' ) );
    71                 else
     71                else {
    7272                    add_filter( 'option_' . $this->id_data[ 'base' ], array( $this, '_preview_filter' ) );
     73                    add_filter( 'default_option_' . $this->id_data[ 'base' ], array( $this, '_preview_filter' ) );
     74                }
    7375                break;
    7476            default :
Note: See TracChangeset for help on using the changeset viewer.