- Timestamp:
- 12/06/2016 02:50:13 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/js/customize-preview-nav-menus.js
r39333 r39510 16 16 */ 17 17 self.init = function() { 18 var self = this; 18 var self = this, synced = false; 19 20 /* 21 * Keep track of whether we synced to determine whether or not bindSettingListener 22 * should also initially fire the listener. This initial firing needs to wait until 23 * after all of the settings have been synced from the pane in order to prevent 24 * an infinite selective fallback-refresh. Note that this sync handler will be 25 * added after the sync handler in customize-preview.js, so it will be triggered 26 * after all of the settings are added. 27 */ 28 api.preview.bind( 'sync', function() { 29 synced = true; 30 } ); 19 31 20 32 if ( api.selectiveRefresh ) { … … 33 45 */ 34 46 if ( setting.get() && ! setting.get()._invalid ) { 35 self.bindSettingListener( setting, { fire: true} );47 self.bindSettingListener( setting, { fire: synced } ); 36 48 } 37 49 } );
Note: See TracChangeset
for help on using the changeset viewer.