WordPress.org

Make WordPress Core

Changeset 29451


Ignore:
Timestamp:
08/08/2014 11:30:30 PM (7 years ago)
Author:
wonderboymusic
Message:

Add some docs to Customizer JS.

Props ericlewis.
See #29157.

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/js/customize-controls.js

    r29329 r29451  
    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.
     
    2731    });
    2832
     33    /**
     34     * @constructor
     35     * @augments wp.customize.Class
     36     */
    2937    api.Control = api.Class.extend({
    3038        initialize: function( id, options ) {
     
    8896        },
    8997
     98        /**
     99         * @abstract
     100         */
    90101        ready: function() {},
    91102
     
    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() {
     
    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() {
     
    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() {
     
    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() {
     
    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,
     
    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++;
     
    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,
     
    925974    });
    926975
    927     /* =====================================================================
    928      * Ready.
    929      * ===================================================================== */
    930 
    931976    api.controlConstructor = {
    932977        color:  api.ColorControl,
  • trunk/src/wp-includes/class-wp-customize-manager.php

    r29170 r29451  
    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
     
    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
     
    184183        }
    185184
    186         // All good, let's do some internal business to preview the theme.
    187185        $this->start_previewing_theme();
    188186    }
     
    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
  • trunk/src/wp-includes/js/customize-preview.js

    r29051 r29451  
    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;
     
    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        /**
Note: See TracChangeset for help on using the changeset viewer.