Changeset 29905
- Timestamp:
- 10/15/2014 05:49:36 PM (10 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/js/customize-controls.js
r29903 r29905 1022 1022 1023 1023 query: function() { 1024 var dirtyCustomized = {}; 1025 api.each( function ( value, key ) { 1026 if ( value._dirty ) { 1027 dirtyCustomized[ key ] = value(); 1028 } 1029 } ); 1030 1024 1031 return { 1025 1032 wp_customize: 'on', 1026 1033 theme: api.settings.theme.stylesheet, 1027 customized: JSON.stringify( api.get()),1034 customized: JSON.stringify( dirtyCustomized ), 1028 1035 nonce: this.nonce.preview 1029 1036 }; … … 1068 1075 } 1069 1076 1077 // Clear setting dirty states 1078 api.each( function ( value ) { 1079 value._dirty = false; 1080 } ); 1070 1081 api.trigger( 'saved' ); 1071 1082 } ); -
trunk/src/wp-includes/js/customize-base.js
r29450 r29905 159 159 this._value = initial; // @todo: potentially change this to a this.set() call. 160 160 this.callbacks = $.Callbacks(); 161 this._dirty = false; 161 162 162 163 $.extend( this, options || {} ); … … 188 189 189 190 this._value = to; 191 this._dirty = true; 190 192 191 193 this.callbacks.fireWith( this, [ to, from ] );
Note: See TracChangeset
for help on using the changeset viewer.