diff --git src/wp-admin/includes/ajax-actions.php src/wp-admin/includes/ajax-actions.php
index 788bd0c..44d378d 100644
|
|
function wp_ajax_save_widget() { |
1588 | 1588 | } |
1589 | 1589 | |
1590 | 1590 | function wp_ajax_update_widget() { |
1591 | | require( ABSPATH . WPINC . '/class-wp-customize-manager.php' ); |
1592 | | $GLOBALS['wp_customize'] = new WP_Customize_Manager; |
1593 | | |
1594 | 1591 | WP_Customize_Widgets::wp_ajax_update_widget(); |
1595 | 1592 | } |
1596 | 1593 | |
diff --git src/wp-admin/js/customize-widgets.js src/wp-admin/js/customize-widgets.js
index fc6028b..cb0b3be 100644
|
|
var WidgetCustomizer = ( function ($) { |
1132 | 1132 | |
1133 | 1133 | params = {}; |
1134 | 1134 | params.action = self.update_widget_ajax_action; |
| 1135 | params.wp_customize = 'on'; |
1135 | 1136 | params[self.update_widget_nonce_post_key] = self.update_widget_nonce_value; |
1136 | 1137 | |
1137 | 1138 | data = $.param( params ); |
… |
… |
var WidgetCustomizer = ( function ($) { |
1153 | 1154 | } |
1154 | 1155 | data += '&' + widget_content.find( '~ :input' ).serialize(); |
1155 | 1156 | |
1156 | | window.console && window.console.log( wp.ajax.settings.url, data ); |
1157 | 1157 | jqxhr = $.post( wp.ajax.settings.url, data, function ( r ) { |
1158 | 1158 | var message, |
1159 | 1159 | sanitized_form, |
diff --git src/wp-includes/class-wp-customize-widgets.php src/wp-includes/class-wp-customize-widgets.php
index 8b0c6f6..98f023e 100644
|
|
class WP_Customize_Widgets { |
321 | 321 | array( |
322 | 322 | 'section' => $section_id, |
323 | 323 | 'sidebar_id' => $sidebar_id, |
324 | | //'priority' => 99, // so it appears at the end |
| 324 | 'priority' => count( $sidebar_widget_ids ), // place Add Widget & Reorder buttons at end |
325 | 325 | ) |
326 | 326 | ); |
327 | 327 | $new_setting_ids[] = $setting_id; |