diff --git a/src/wp-admin/js/customize-controls.js b/src/wp-admin/js/customize-controls.js
index 5ea7aff..85b171d 100644
|
a
|
b
|
|
| 3 | 3 | var api = wp.customize; |
| 4 | 4 | |
| 5 | 5 | /** |
| | 6 | * @constructor |
| | 7 | * @augments wp.customize.Value |
| | 8 | * @augments wp.customize.Class |
| | 9 | * |
| 6 | 10 | * @param options |
| 7 | 11 | * - previewer - The Previewer instance to sync with. |
| 8 | 12 | * - transport - The transport to use for previewing. Supports 'refresh' and 'postMessage'. |
| … |
… |
|
| 26 | 30 | } |
| 27 | 31 | }); |
| 28 | 32 | |
| | 33 | /** |
| | 34 | * @constructor |
| | 35 | * @augments wp.customize.Class |
| | 36 | */ |
| 29 | 37 | api.Control = api.Class.extend({ |
| 30 | 38 | initialize: function( id, options ) { |
| 31 | 39 | var control = this, |
| … |
… |
|
| 87 | 95 | control.toggle( control.active() ); |
| 88 | 96 | }, |
| 89 | 97 | |
| | 98 | /** |
| | 99 | * @abstract |
| | 100 | */ |
| 90 | 101 | ready: function() {}, |
| 91 | 102 | |
| 92 | 103 | /** |
| … |
… |
|
| 141 | 152 | } |
| 142 | 153 | }); |
| 143 | 154 | |
| | 155 | /** |
| | 156 | * @constructor |
| | 157 | * @augments wp.customize.Control |
| | 158 | * @augments wp.customize.Class |
| | 159 | */ |
| 144 | 160 | api.ColorControl = api.Control.extend({ |
| 145 | 161 | ready: function() { |
| 146 | 162 | var control = this, |
| … |
… |
|
| 157 | 173 | } |
| 158 | 174 | }); |
| 159 | 175 | |
| | 176 | /** |
| | 177 | * @constructor |
| | 178 | * @augments wp.customize.Control |
| | 179 | * @augments wp.customize.Class |
| | 180 | */ |
| 160 | 181 | api.UploadControl = api.Control.extend({ |
| 161 | 182 | ready: function() { |
| 162 | 183 | var control = this; |
| … |
… |
|
| 210 | 231 | } |
| 211 | 232 | }); |
| 212 | 233 | |
| | 234 | /** |
| | 235 | * @constructor |
| | 236 | * @augments wp.customize.UploadControl |
| | 237 | * @augments wp.customize.Control |
| | 238 | * @augments wp.customize.Class |
| | 239 | */ |
| 213 | 240 | api.ImageControl = api.UploadControl.extend({ |
| 214 | 241 | ready: function() { |
| 215 | 242 | var control = this, |
| … |
… |
|
| 328 | 355 | } |
| 329 | 356 | }); |
| 330 | 357 | |
| | 358 | /** |
| | 359 | * @constructor |
| | 360 | * @augments wp.customize.Control |
| | 361 | * @augments wp.customize.Class |
| | 362 | */ |
| 331 | 363 | api.HeaderControl = api.Control.extend({ |
| 332 | 364 | ready: function() { |
| 333 | 365 | this.btnRemove = $('#customize-control-header_image .actions .remove'); |
| … |
… |
|
| 544 | 576 | // Create the collection of Control objects. |
| 545 | 577 | api.control = new api.Values({ defaultConstructor: api.Control }); |
| 546 | 578 | |
| | 579 | /** |
| | 580 | * @constructor |
| | 581 | * @augments wp.customize.Messenger |
| | 582 | * @augments wp.customize.Class |
| | 583 | * @mixes wp.customize.Events |
| | 584 | */ |
| 547 | 585 | api.PreviewFrame = api.Messenger.extend({ |
| 548 | 586 | sensitivity: 2000, |
| 549 | 587 | |
| … |
… |
|
| 714 | 752 | |
| 715 | 753 | (function(){ |
| 716 | 754 | var uuid = 0; |
| | 755 | /** |
| | 756 | * Create a universally unique identifier. |
| | 757 | * |
| | 758 | * @return {int} |
| | 759 | */ |
| 717 | 760 | api.PreviewFrame.uuid = function() { |
| 718 | 761 | return 'preview-' + uuid++; |
| 719 | 762 | }; |
| 720 | 763 | }()); |
| 721 | 764 | |
| | 765 | /** |
| | 766 | * @constructor |
| | 767 | * @augments wp.customize.Messenger |
| | 768 | * @augments wp.customize.Class |
| | 769 | * @mixes wp.customize.Events |
| | 770 | */ |
| 722 | 771 | api.Previewer = api.Messenger.extend({ |
| 723 | 772 | refreshBuffer: 250, |
| 724 | 773 | |
| … |
… |
|
| 924 | 973 | } |
| 925 | 974 | }); |
| 926 | 975 | |
| 927 | | /* ===================================================================== |
| 928 | | * Ready. |
| 929 | | * ===================================================================== */ |
| 930 | | |
| 931 | 976 | api.controlConstructor = { |
| 932 | 977 | color: api.ColorControl, |
| 933 | 978 | upload: api.UploadControl, |
diff --git a/src/wp-includes/class-wp-customize-manager.php b/src/wp-includes/class-wp-customize-manager.php
index 5e2ba5d..5067126 100644
|
a
|
b
|
|
| 16 | 16 | */ |
| 17 | 17 | final class WP_Customize_Manager { |
| 18 | 18 | /** |
| 19 | | * An instance of the theme that is being customized. |
| | 19 | * An instance of the theme being previewed. |
| 20 | 20 | * |
| 21 | 21 | * @var WP_Theme |
| 22 | 22 | */ |
| … |
… |
final class WP_Customize_Manager {
|
| 30 | 30 | protected $original_stylesheet; |
| 31 | 31 | |
| 32 | 32 | /** |
| 33 | | * Whether filters have been set to change the active theme to the theme being |
| 34 | | * customized. |
| | 33 | * Whether this is a Customizer pageload. |
| 35 | 34 | * |
| 36 | 35 | * @var boolean |
| 37 | 36 | */ |
| … |
… |
final class WP_Customize_Manager {
|
| 183 | 182 | $this->wp_die( -1 ); |
| 184 | 183 | } |
| 185 | 184 | |
| 186 | | // All good, let's do some internal business to preview the theme. |
| 187 | 185 | $this->start_previewing_theme(); |
| 188 | 186 | } |
| 189 | 187 | |
| … |
… |
final class WP_Customize_Manager {
|
| 200 | 198 | } |
| 201 | 199 | |
| 202 | 200 | /** |
| 203 | | * Start previewing the selected theme by adding filters to change the current theme. |
| | 201 | * If the theme to be previewed isn't the active theme, add filter callbacks |
| | 202 | * to swap it out at runtime. |
| 204 | 203 | * |
| 205 | 204 | * @since 3.4.0 |
| 206 | 205 | */ |
diff --git a/src/wp-includes/js/customize-preview.js b/src/wp-includes/js/customize-preview.js
index 99643fb..6da26f4 100644
|
a
|
b
|
|
| 2 | 2 | var api = wp.customize, |
| 3 | 3 | debounce; |
| 4 | 4 | |
| | 5 | /** |
| | 6 | * Returns a debounced version of the function. |
| | 7 | * |
| | 8 | * @todo Require Underscore.js for this file and retire this. |
| | 9 | */ |
| 5 | 10 | debounce = function( fn, delay, context ) { |
| 6 | 11 | var timeout; |
| 7 | 12 | return function() { |
| … |
… |
|
| 17 | 22 | }; |
| 18 | 23 | }; |
| 19 | 24 | |
| | 25 | /** |
| | 26 | * @constructor |
| | 27 | * @augments wp.customize.Messenger |
| | 28 | * @augments wp.customize.Class |
| | 29 | * @mixes wp.customize.Events |
| | 30 | */ |
| 20 | 31 | api.Preview = api.Messenger.extend({ |
| 21 | 32 | /** |
| 22 | 33 | * Requires params: |