diff --git src/wp-admin/js/customize-controls.js src/wp-admin/js/customize-controls.js
index 4901b56..caf296a 100644
|
|
|
|
| 3375 | 3375 | api.bind( 'nonce-refresh', function( nonce ) { |
| 3376 | 3376 | $.extend( api.settings.nonce, nonce ); |
| 3377 | 3377 | $.extend( api.previewer.nonce, nonce ); |
| | 3378 | api.previewer.send( 'nonce-refresh', nonce ); |
| 3378 | 3379 | }); |
| 3379 | 3380 | |
| 3380 | 3381 | // Create Settings |
diff --git src/wp-includes/class-wp-customize-manager.php src/wp-includes/class-wp-customize-manager.php
index aa73ed7..da3b222 100644
|
|
|
final class WP_Customize_Manager { |
| 801 | 801 | */ |
| 802 | 802 | public function customize_preview_settings() { |
| 803 | 803 | $settings = array( |
| | 804 | 'theme' => array( |
| | 805 | 'stylesheet' => $this->get_stylesheet(), |
| | 806 | 'active' => $this->is_theme_active(), |
| | 807 | ), |
| 804 | 808 | 'channel' => wp_unslash( $_POST['customize_messenger_channel'] ), |
| 805 | 809 | 'activePanels' => array(), |
| 806 | 810 | 'activeSections' => array(), |
| … |
… |
final class WP_Customize_Manager { |
| 808 | 812 | '_dirty' => array_keys( $this->unsanitized_post_values() ), |
| 809 | 813 | ); |
| 810 | 814 | |
| 811 | | if ( 2 == $this->nonce_tick ) { |
| 812 | | $settings['nonce'] = array( |
| 813 | | 'save' => wp_create_nonce( 'save-customize_' . $this->get_stylesheet() ), |
| 814 | | 'preview' => wp_create_nonce( 'preview-customize_' . $this->get_stylesheet() ) |
| 815 | | ); |
| 816 | | } |
| | 815 | $settings['nonce'] = array( |
| | 816 | 'save' => wp_create_nonce( 'save-customize_' . $this->get_stylesheet() ), |
| | 817 | 'preview' => wp_create_nonce( 'preview-customize_' . $this->get_stylesheet() ), |
| | 818 | ); |
| | 819 | |
| | 820 | /** This filter is documented in wp-includes/class-wp-customize-manager.php */ |
| | 821 | $settings['nonce'] = apply_filters( 'customize_refresh_nonces', $settings['nonce'], $this ); |
| 817 | 822 | |
| 818 | 823 | foreach ( $this->panels as $panel_id => $panel ) { |
| 819 | 824 | if ( $panel->check_capabilities() ) { |
| … |
… |
final class WP_Customize_Manager { |
| 1703 | 1708 | 'documentTitleTmpl' => $this->get_document_title_template(), |
| 1704 | 1709 | ); |
| 1705 | 1710 | |
| | 1711 | /** This filter is documented in wp-includes/class-wp-customize-manager.php */ |
| | 1712 | $settings['nonce'] = apply_filters( 'customize_refresh_nonces', $settings['nonce'], $this ); |
| | 1713 | |
| 1706 | 1714 | // Prepare Customize Section objects to pass to JavaScript. |
| 1707 | 1715 | foreach ( $this->sections() as $id => $section ) { |
| 1708 | 1716 | if ( $section->check_capabilities() ) { |
diff --git src/wp-includes/js/customize-preview.js src/wp-includes/js/customize-preview.js
index 1d18027..b6da775 100644
|
|
|
|
| 146 | 146 | }); |
| 147 | 147 | |
| 148 | 148 | api.preview.bind( 'active', function() { |
| 149 | | if ( api.settings.nonce ) { |
| 150 | | api.preview.send( 'nonce', api.settings.nonce ); |
| 151 | | } |
| | 149 | api.preview.send( 'nonce', api.settings.nonce ); |
| 152 | 150 | |
| 153 | 151 | api.preview.send( 'documentTitle', document.title ); |
| 154 | 152 | }); |
| … |
… |
|
| 163 | 161 | } ); |
| 164 | 162 | } ); |
| 165 | 163 | |
| | 164 | api.preview.bind( 'nonce-refresh', function( nonce ) { |
| | 165 | $.extend( api.settings.nonce, nonce ); |
| | 166 | } ); |
| | 167 | |
| 166 | 168 | /* |
| 167 | 169 | * Send a message to the parent customize frame with a list of which |
| 168 | 170 | * containers and controls are active. |