Customizer: Only POST dirty settings to preview to improve performance.

props westonruter.
fixes #29983.

git-svn-id: https://develop.svn.wordpress.org/trunk@29905 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90)
2014-10-15 17:49:36 +00:00
parent 5829ccba9b
commit 83b0f3f681
2 changed files with 14 additions and 1 deletions
+2
View File
@@ -158,6 +158,7 @@ window.wp = window.wp || {};
initialize: function( initial, options ) {
this._value = initial; // @todo: potentially change this to a this.set() call.
this.callbacks = $.Callbacks();
this._dirty = false;
$.extend( this, options || {} );
@@ -187,6 +188,7 @@ window.wp = window.wp || {};
return this;
this._value = to;
this._dirty = true;
this.callbacks.fireWith( this, [ to, from ] );