Changeset 27819
- Timestamp:
- 03/28/2014 03:34:17 PM (9 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/customize-widgets.js
r27798 r27819 10 10 OldPreviewer, 11 11 customize = wp.customize, self = { 12 update_widget_ajax_action: null, 13 update_widget_nonce_value: null, 14 update_widget_nonce_post_key: null, 12 nonce: null, 15 13 i18n: { 16 14 save_btn_label: '', … … 1202 1200 1203 1201 params = {}; 1204 params.action = self.update_widget_ajax_action;1202 params.action = 'update-widget'; 1205 1203 params.wp_customize = 'on'; 1206 params [self.update_widget_nonce_post_key] = self.update_widget_nonce_value;1204 params.nonce = self.nonce; 1207 1205 1208 1206 data = $.param( params ); -
trunk/src/wp-includes/class-wp-customize-widgets.php
r27818 r27819 134 134 $this->get_post_value( 'action' ) === 'update-widget' 135 135 && 136 check_ajax_referer( 'update-widget', ' update-widget-nonce', false )136 check_ajax_referer( 'update-widget', 'nonce', false ) 137 137 ); 138 138 … … 142 142 $this->get_post_value( 'action' ) === 'customize_save' 143 143 && 144 check_ajax_referer( 'save-customize_' . $this->manager->get_stylesheet(), 'nonce' )144 check_ajax_referer( 'save-customize_' . $this->manager->get_stylesheet(), 'nonce', false ) 145 145 ); 146 146 … … 575 575 global $wp_scripts; 576 576 $exports = array( 577 'update_widget_ajax_action' => 'update-widget', 578 'update_widget_nonce_value' => wp_create_nonce( 'update-widget' ), 579 'update_widget_nonce_post_key' => 'update-widget-nonce', 577 'nonce' => wp_create_nonce( 'update-widget' ), 580 578 'registered_sidebars' => array_values( $GLOBALS['wp_registered_sidebars'] ), 581 579 'registered_widgets' => $GLOBALS['wp_registered_widgets'], … … 1160 1158 } 1161 1159 1162 check_ajax_referer( 'update-widget', ' update-widget-nonce' );1160 check_ajax_referer( 'update-widget', 'nonce' ); 1163 1161 1164 1162 if ( ! current_user_can( 'edit_theme_options' ) ) { … … 1169 1167 wp_send_json_error(); 1170 1168 } 1171 1172 unset( $_POST['update-widget-nonce'], $_POST['action'] );1173 1169 1174 1170 do_action( 'load-widgets.php' );
Note: See TracChangeset
for help on using the changeset viewer.