Changeset 39558
- Timestamp:
- 12/10/2016 06:29:12 AM (8 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/customize-nav-menus.js
r39548 r39558 1178 1178 // @todo It would be better if this was added directly on the setting itself, as opposed to the control. 1179 1179 control.setting.validate = function( value ) { 1180 return parseInt( value, 10 ); 1180 if ( '' === value ) { 1181 return 0; 1182 } else { 1183 return parseInt( value, 10 ); 1184 } 1181 1185 }; 1182 1186 -
trunk/src/wp-includes/class-wp-customize-nav-menus.php
r39506 r39558 532 532 public function customize_register() { 533 533 534 /* 535 * Preview settings for nav menus early so that the sections and controls will be added properly. 536 * See https://github.com/xwp/wp-customize-snapshots/blob/962586659688a5b1fd9ae93618b7ce2d4e7a421c/php/class-customize-snapshot-manager.php#L506-L543 537 */ 534 // Preview settings for nav menus early so that the sections and controls will be added properly. 538 535 $nav_menus_setting_ids = array(); 539 536 foreach ( array_keys( $this->manager->unsanitized_post_values() ) as $setting_id ) { … … 543 540 } 544 541 $this->manager->add_dynamic_settings( $nav_menus_setting_ids ); 545 foreach ( $nav_menus_setting_ids as $setting_id ) { 546 $setting = $this->manager->get_setting( $setting_id ); 547 if ( $setting ) { 548 $setting->preview(); 542 if ( ! $this->manager->doing_ajax( 'customize_save' ) ) { 543 foreach ( $nav_menus_setting_ids as $setting_id ) { 544 $setting = $this->manager->get_setting( $setting_id ); 545 if ( $setting ) { 546 $setting->preview(); 547 } 549 548 } 550 549 }
Note: See TracChangeset
for help on using the changeset viewer.