Make WordPress Core

Ticket #29157: 29157.2.diff

File 29157.2.diff, 4.7 KB (added by ericlewis, 9 years ago)
  • src/wp-admin/js/customize-controls.js

    diff --git a/src/wp-admin/js/customize-controls.js b/src/wp-admin/js/customize-controls.js
    index 5ea7aff..85b171d 100644
    a b  
    33        var api = wp.customize;
    44
    55        /**
     6         * @constructor
     7         * @augments wp.customize.Value
     8         * @augments wp.customize.Class
     9         *
    610         * @param options
    711         * - previewer - The Previewer instance to sync with.
    812         * - transport - The transport to use for previewing. Supports 'refresh' and 'postMessage'.
     
    2630                }
    2731        });
    2832
     33        /**
     34         * @constructor
     35         * @augments wp.customize.Class
     36         */
    2937        api.Control = api.Class.extend({
    3038                initialize: function( id, options ) {
    3139                        var control = this,
     
    8795                        control.toggle( control.active() );
    8896                },
    8997
     98                /**
     99                 * @abstract
     100                 */
    90101                ready: function() {},
    91102
    92103                /**
     
    141152                }
    142153        });
    143154
     155        /**
     156         * @constructor
     157         * @augments wp.customize.Control
     158         * @augments wp.customize.Class
     159         */
    144160        api.ColorControl = api.Control.extend({
    145161                ready: function() {
    146162                        var control = this,
     
    157173                }
    158174        });
    159175
     176        /**
     177         * @constructor
     178         * @augments wp.customize.Control
     179         * @augments wp.customize.Class
     180         */
    160181        api.UploadControl = api.Control.extend({
    161182                ready: function() {
    162183                        var control = this;
     
    210231                }
    211232        });
    212233
     234        /**
     235         * @constructor
     236         * @augments wp.customize.UploadControl
     237         * @augments wp.customize.Control
     238         * @augments wp.customize.Class
     239         */
    213240        api.ImageControl = api.UploadControl.extend({
    214241                ready: function() {
    215242                        var control = this,
     
    328355                }
    329356        });
    330357
     358        /**
     359         * @constructor
     360         * @augments wp.customize.Control
     361         * @augments wp.customize.Class
     362         */
    331363        api.HeaderControl = api.Control.extend({
    332364                ready: function() {
    333365                        this.btnRemove        = $('#customize-control-header_image .actions .remove');
     
    544576        // Create the collection of Control objects.
    545577        api.control = new api.Values({ defaultConstructor: api.Control });
    546578
     579        /**
     580         * @constructor
     581         * @augments wp.customize.Messenger
     582         * @augments wp.customize.Class
     583         * @mixes wp.customize.Events
     584         */
    547585        api.PreviewFrame = api.Messenger.extend({
    548586                sensitivity: 2000,
    549587
     
    714752
    715753        (function(){
    716754                var uuid = 0;
     755                /**
     756                 * Create a universally unique identifier.
     757                 *
     758                 * @return {int}
     759                 */
    717760                api.PreviewFrame.uuid = function() {
    718761                        return 'preview-' + uuid++;
    719762                };
    720763        }());
    721764
     765        /**
     766         * @constructor
     767         * @augments wp.customize.Messenger
     768         * @augments wp.customize.Class
     769         * @mixes wp.customize.Events
     770         */
    722771        api.Previewer = api.Messenger.extend({
    723772                refreshBuffer: 250,
    724773
     
    924973                }
    925974        });
    926975
    927         /* =====================================================================
    928          * Ready.
    929          * ===================================================================== */
    930 
    931976        api.controlConstructor = {
    932977                color:  api.ColorControl,
    933978                upload: api.UploadControl,
  • src/wp-includes/class-wp-customize-manager.php

    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  
    1616 */
    1717final class WP_Customize_Manager {
    1818        /**
    19          * An instance of the theme that is being customized.
     19         * An instance of the theme being previewed.
    2020         *
    2121         * @var WP_Theme
    2222         */
    final class WP_Customize_Manager { 
    3030        protected $original_stylesheet;
    3131
    3232        /**
    33          * Whether filters have been set to change the active theme to the theme being
    34          * customized.
     33         * Whether this is a Customizer pageload.
    3534         *
    3635         * @var boolean
    3736         */
    final class WP_Customize_Manager { 
    183182                                $this->wp_die( -1 );
    184183                }
    185184
    186                 // All good, let's do some internal business to preview the theme.
    187185                $this->start_previewing_theme();
    188186        }
    189187
    final class WP_Customize_Manager { 
    200198        }
    201199
    202200        /**
    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.
    204203         *
    205204         * @since 3.4.0
    206205         */
  • src/wp-includes/js/customize-preview.js

    diff --git a/src/wp-includes/js/customize-preview.js b/src/wp-includes/js/customize-preview.js
    index 99643fb..6da26f4 100644
    a b  
    22        var api = wp.customize,
    33                debounce;
    44
     5        /**
     6         * Returns a debounced version of the function.
     7         *
     8         * @todo Require Underscore.js for this file and retire this.
     9         */
    510        debounce = function( fn, delay, context ) {
    611                var timeout;
    712                return function() {
     
    1722                };
    1823        };
    1924
     25        /**
     26         * @constructor
     27         * @augments wp.customize.Messenger
     28         * @augments wp.customize.Class
     29         * @mixes wp.customize.Events
     30         */
    2031        api.Preview = api.Messenger.extend({
    2132                /**
    2233                 * Requires params: