Make WordPress Core


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.4/wp-includes/class-wp-customize-manager.php

    r21070 r21136  
    1818    protected $controls = array();
    1919
     20    protected $nonce_tick;
     21
    2022    protected $customized;
    2123
     
    309311     */
    310312    public function customize_preview_init() {
     313        $this->nonce_tick = check_ajax_referer( 'preview-customize_' . $this->get_stylesheet(), 'nonce' );
     314
    311315        $this->prepare_controls();
    312316
     
    363367        );
    364368
     369        if ( 2 == $this->nonce_tick ) {
     370            $settings['nonce'] = array(
     371                'save' => wp_create_nonce( 'save-customize_' . $this->get_stylesheet() ),
     372                'preview' => wp_create_nonce( 'preview-customize_' . $this->get_stylesheet() )
     373            );
     374        }
     375
    365376        foreach ( $this->settings as $id => $setting ) {
    366377            $settings['values'][ $id ] = $setting->js_value();
     
    469480            die;
    470481
    471         check_ajax_referer( 'customize_controls-' . $this->get_stylesheet(), 'nonce' );
     482        check_ajax_referer( 'save-customize_' . $this->get_stylesheet(), 'nonce' );
    472483
    473484        // Do we have to switch themes?
Note: See TracChangeset for help on using the changeset viewer.