WordPress.org

Make WordPress Core

Changeset 42403


Ignore:
Timestamp:
12/15/2017 01:41:56 PM (23 months ago)
Author:
atimmer
Message:

Docs: Improve wp-admin JSDoc structural data globally.

JSDoc takes it structural data from @namespace, @lends and @memberOf. This change fixes these tags for all JavaScript files in the wp-admin folder.

  • Add jsdoc configuration to parse wp-admin/js files. Use jsdoc -c jsdoc.conf.json to generate JSDoc.
  • Define all used namespaces using @namespace.
  • Define each usage of the extend function as a prototype assignment using @lends.
  • Add @alias if JSDoc cannot detect the correct name automatically.

This has previously been corrected for all wp-includes JavaScript files: [41351].

Props herregroen.
Fixes #42485.

Location:
trunk
Files:
30 edited

Legend:

Unmodified
Added
Removed
  • trunk/jsdoc.conf.json

    r41370 r42403  
    33    "recurseDepth": 10,
    44    "source": {
    5         "include": ["src/wp-includes/js"],
     5        "include": [
     6            "src/wp-includes/js",
     7            "src/wp-admin/js"
     8        ],
    69        "exclude": [
     10            "src/wp-includes/js/codemirror",
    711            "src/wp-includes/js/tinymce",
    812            "src/wp-includes/js/crop",
     
    1014            "src/wp-includes/js/jcrop",
    1115            "src/wp-includes/js/jquery",
    12             "src/wp-includes/js/mediaelement",
     16            "src/wp-includes/js/mediaelement/mediaelement.js",
     17            "src/wp-includes/js/mediaelement/mediaelement-and-player.js",
     18            "src/wp-includes/js/plupload/handlers.js",
     19            "src/wp-includes/js/plupload/moxie.js",
     20            "src/wp-includes/js/plupload/plupload.full.min.js",
     21            "src/wp-includes/js/plupload/plupload.js",
    1322            "src/wp-includes/js/swfupload",
    1423            "src/wp-includes/js/thickbox",
     
    3645    "opts": {
    3746        "template": "./node_modules/ink-docstrap/template",
    38         "recurse": true
     47        "recurse": true,
     48        "private": true
    3949    }
    4050}
  • trunk/src/wp-admin/js/code-editor.js

    r41992 r42403  
    11if ( 'undefined' === typeof window.wp ) {
     2    /**
     3     * @namespace wp
     4     */
    25    window.wp = {};
    36}
    47if ( 'undefined' === typeof window.wp.codeEditor ) {
     8    /**
     9     * @namespace wp.codeEditor
     10     */
    511    window.wp.codeEditor = {};
    612}
     
    3440     * @param {Function}   settings.onChangeLintingErrors - Callback for when there are changes to linting errors.
    3541     * @param {Function}   settings.onUpdateErrorNotice - Callback to update error notice.
     42     *
    3643     * @returns {void}
    3744     */
     
    203210     * @param {Function}   settings.onTabNext - Callback to handle tabbing to the next tabbable element.
    204211     * @param {Function}   settings.onTabPrevious - Callback to handle tabbing to the previous tabbable element.
     212     *
    205213     * @returns {void}
    206214     */
     
    241249
    242250    /**
    243      * @typedef {object} CodeEditorInstance
     251     * @typedef {object} wp.codeEditor~CodeEditorInstance
    244252     * @property {object} settings - The code editor settings.
    245253     * @property {CodeMirror} codemirror - The CodeMirror instance.
     
    261269     * @param {object}                [settings.htmlhint] - Rules for HTMLHint.
    262270     * @param {object}                [settings.jshint] - Rules for JSHint.
     271     *
    263272     * @returns {CodeEditorInstance} Instance.
    264273     */
  • trunk/src/wp-admin/js/color-picker.js

    r41329 r42403  
    1515     * Creates a jQuery UI color picker that is used in the theme customizer.
    1616     *
     17     * @class $.widget.wp.wpColorPicker
     18     *
    1719     * @since 3.5.0
    1820     */
    19     ColorPicker = {
     21    ColorPicker = /** @lends $.widget.wp.wpColorPicker.prototype */{
    2022        options: {
    2123            defaultColor: false,
     
    5658                /**
    5759                 * @summary Handles the onChange event if one has been defined in the options.
     60                 *
     61                 * @ignore
    5862                 *
    5963                 * @param {Event} event    The event that's being called.
     
    180184                 * @since 3.5.0
    181185                 *
     186                 * @ignore
     187                 *
    182188                 * @param {Event} event    The event that's being called.
    183189                 * @param {HTMLElement} ui The HTMLElement containing the color picker.
  • trunk/src/wp-admin/js/customize-controls.js

    r42187 r42403  
    33    var Container, focus, normalizedTransitionendEventName, api = wp.customize;
    44
    5     /**
    6      * A notification that is displayed in a full-screen overlay.
    7      *
    8      * @since 4.9.0
    9      * @class
    10      * @augments wp.customize.Notification
    11      */
    12     api.OverlayNotification = api.Notification.extend({
     5    api.OverlayNotification = api.Notification.extend(/** @lends wp.customize.OverlayNotification.prototype */{
    136
    147        /**
     
    2114
    2215        /**
    23          * Initialize.
     16         * A notification that is displayed in a full-screen overlay.
     17         *
     18         * @constructs wp.customize.OverlayNotification
     19         * @augments   wp.customize.Notification
    2420         *
    2521         * @since 4.9.0
     
    6965    });
    7066
    71     /**
    72      * A collection of observable notifications.
    73      *
    74      * @since 4.9.0
    75      * @class
    76      * @augments wp.customize.Values
    77      */
    78     api.Notifications = api.Values.extend({
     67    api.Notifications = api.Values.extend(/** @lends wp.customize.Notifications.prototype */{
    7968
    8069        /**
     
    9584
    9685        /**
    97          * Initialize notifications area.
     86         * A collection of observable notifications.
    9887         *
    9988         * @since 4.9.0
    100          * @constructor
     89         *
     90         * @constructs wp.customize.Notifications
     91         * @augments   wp.customize.Values
     92         *
    10193         * @param {object}  options - Options.
    10294         * @param {jQuery}  [options.container] - Container element for notifications. This can be injected later.
    10395         * @param {boolean} [options.alt] - Whether alternative style should be used when rendering notifications.
     96         *
    10497         * @returns {void}
    105          * @this {wp.customize.Notifications}
    10698         */
    10799        initialize: function( options ) {
     
    182174         * @param {boolean} [args.sort=false] - Whether to return the notifications sorted.
    183175         * @return {Array.<wp.customize.Notification>} Notifications.
    184          * @this {wp.customize.Notifications}
    185176         */
    186177        get: function( args ) {
     
    218209         * @since 4.9.0
    219210         * @returns {void}
    220          * @this {wp.customize.Notifications}
    221211         */
    222212        render: function() {
     
    341331    });
    342332
    343     /**
    344      * A Customizer Setting.
    345      *
    346      * A setting is WordPress data (theme mod, option, menu, etc.) that the user can
    347      * draft changes to in the Customizer.
    348      *
    349      * @see PHP class WP_Customize_Setting.
    350      *
    351      * @since 3.4.0
    352      * @class
    353      * @augments wp.customize.Value
    354      * @augments wp.customize.Class
    355      */
    356     api.Setting = api.Value.extend({
     333    api.Setting = api.Value.extend(/** @lends wp.customize.Setting.prototype */{
    357334
    358335        /**
     
    368345
    369346        /**
    370          * Initialize.
     347         * A Customizer Setting.
     348         *
     349         * A setting is WordPress data (theme mod, option, menu, etc.) that the user can
     350         * draft changes to in the Customizer.
     351         *
     352         * @see PHP class WP_Customize_Setting.
     353         *
     354         * @constructs wp.customize.Setting
     355         * @augments   wp.customize.Value
    371356         *
    372357         * @since 3.4.0
     
    449434     * Current change count.
    450435     *
     436     * @alias wp.customize._latestRevision
     437     *
    451438     * @since 4.7.0
    452439     * @type {number}
     
    458445     * Last revision that was saved.
    459446     *
     447     * @alias wp.customize._lastSavedRevision
     448     *
    460449     * @since 4.7.0
    461450     * @type {number}
     
    466455    /**
    467456     * Latest revisions associated with the updated setting.
     457     *
     458     * @alias wp.customize._latestSettingRevisions
    468459     *
    469460     * @since 4.7.0
     
    496487     * Get the dirty setting values.
    497488     *
     489     * @alias wp.customize.dirtyValues
     490     *
    498491     * @since 4.7.0
    499492     * @access public
     
    526519    /**
    527520     * Request updates to the changeset.
     521     *
     522     * @alias wp.customize.requestChangesetUpdate
    528523     *
    529524     * @since 4.7.0
     
    662657     * Watch all changes to Value properties, and bubble changes to parent Values instance
    663658     *
     659     * @alias wp.customize.utils.bubbleChildValueChanges
     660     *
    664661     * @since 4.1.0
    665662     *
     
    679676    /**
    680677     * Expand a panel, section, or control and focus on the first focusable element.
     678     *
     679     * @alias wp.customize~focus
    681680     *
    682681     * @since 4.1.0
     
    727726     * If a.priority() === b.priority(), then sort by their respective params.instanceNumber.
    728727     *
     728     * @alias wp.customize.utils.prioritySort
     729     *
    729730     * @since 4.1.0
    730731     *
     
    744745     * Return whether the supplied Event object is for a keydown event but not the Enter key.
    745746     *
     747     * @alias wp.customize.utils.isKeydownButNotEnterEvent
     748     *
    746749     * @since 4.1.0
    747750     *
     
    755758    /**
    756759     * Return whether the two lists of elements are the same and are in the same order.
     760     *
     761     * @alias wp.customize.utils.areElementListsEqual
    757762     *
    758763     * @since 4.1.0
     
    781786     * UI element, after an optional delay. If the user focuses the element
    782787     * before the delay passes, the reminder is canceled.
     788     *
     789     * @alias wp.customize.utils.highlightButton
    783790     *
    784791     * @since 4.9.0
     
    835842     * Same functionality as the `current_time( 'mysql', false )` function in PHP.
    836843     *
     844     * @alias wp.customize.utils.getCurrentTimestamp
     845     *
    837846     * @since 4.9.0
    838847     *
     
    851860    /**
    852861     * Get remaining time of when the date is set.
     862     *
     863     * @alias wp.customize.utils.getRemainingTime
    853864     *
    854865     * @since 4.9.0
     
    876887     *
    877888     * @since 4.7.0
     889     *
     890     * @ignore
    878891     *
    879892     * @returns {string|null} Normalized `transitionend` event name or null if CSS transitions are not supported.
     
    898911    })();
    899912
    900     /**
    901      * Base class for Panel and Section.
    902      *
    903      * @since 4.1.0
    904      *
    905      * @class
    906      * @augments wp.customize.Class
    907      */
    908     Container = api.Class.extend({
     913    Container = api.Class.extend(/** @lends wp.customize~Container.prototype */{
    909914        defaultActiveArguments: { duration: 'fast', completeCallback: $.noop },
    910915        defaultExpandedArguments: { duration: 'fast', completeCallback: $.noop },
     
    921926
    922927        /**
     928         * Base class for Panel and Section.
     929         *
     930         * @constructs wp.customize~Container
     931         * @augments   wp.customize.Class
     932         *
    923933         * @since 4.1.0
     934         *
     935         * @borrows wp.customize~focus as focus
    924936         *
    925937         * @param {string}         id - The ID for the container.
     
    10001012         * @since 4.9.0
    10011013         * @returns {jQuery} Notification container element.
    1002          * @this {wp.customize.Control}
    10031014         */
    10041015        getNotificationsContainerElement: function() {
     
    13061317        },
    13071318
    1308         /**
    1309          * Bring the container into view and then expand this and bring it into view
    1310          * @param {Object} [params]
     1319        /*
     1320         * is documented using @borrows in the constructor.
    13111321         */
    13121322        focus: focus,
     
    13711381    });
    13721382
    1373     /**
    1374      * @since 4.1.0
    1375      *
    1376      * @class
    1377      * @augments wp.customize.Class
    1378      */
    1379     api.Section = Container.extend({
     1383    api.Section = Container.extend(/** @lends wp.customize.Section.prototype */{
    13801384        containerType: 'section',
    13811385        containerParent: '#customize-theme-controls',
     
    13941398
    13951399        /**
     1400         * @constructs wp.customize.Section
     1401         * @augments   wp.customize~Container
     1402         *
    13961403         * @since 4.1.0
    13971404         *
     
    16551662    });
    16561663
    1657     /**
    1658      * wp.customize.ThemesSection
    1659      *
    1660      * Custom section for themes that loads themes by category, and also
    1661      * handles the theme-details view rendering and navigation.
    1662      *
    1663      * @constructor
    1664      * @augments wp.customize.Section
    1665      * @augments wp.customize.Container
    1666      */
    1667     api.ThemesSection = api.Section.extend({
     1664    api.ThemesSection = api.Section.extend(/** @lends wp.customize.ThemesSection.prototype */{
    16681665        currentTheme: '',
    16691666        overlay: '',
     
    16841681
    16851682        /**
    1686          * Initialize.
     1683         * wp.customize.ThemesSection
     1684         *
     1685         * Custom section for themes that loads themes by category, and also
     1686         * handles the theme-details view rendering and navigation.
     1687         *
     1688         * @constructs wp.customize.ThemesSection
     1689         * @augments   wp.customize.Section
    16871690         *
    16881691         * @since 4.9.0
     
    26282631    });
    26292632
    2630     /**
    2631      * Class wp.customize.OuterSection.
    2632      *
    2633      * Creates section outside of the sidebar, there is no ui to trigger collapse/expand so
    2634      * it would require custom handling.
    2635      *
    2636      * @since 4.9
    2637      *
    2638      * @constructor
    2639      * @augments wp.customize.Section
    2640      * @augments wp.customize.Container
    2641      */
    2642     api.OuterSection = api.Section.extend({
    2643 
    2644         /**
    2645          * Initialize.
     2633    api.OuterSection = api.Section.extend(/** @lends wp.customize.OuterSection.prototype */{
     2634
     2635        /**
     2636         * Class wp.customize.OuterSection.
     2637         *
     2638         * Creates section outside of the sidebar, there is no ui to trigger collapse/expand so
     2639         * it would require custom handling.
     2640         *
     2641         * @constructs wp.customize.OuterSection
     2642         * @augments   wp.customize.Section
    26462643         *
    26472644         * @since 4.9.0
     
    27472744    });
    27482745
    2749     /**
    2750      * @since 4.1.0
    2751      *
    2752      * @class
    2753      * @augments wp.customize.Class
    2754      */
    2755     api.Panel = Container.extend({
     2746    api.Panel = Container.extend(/** @lends wp.customize.Panel.prototype */{
    27562747        containerType: 'panel',
    27572748
    27582749        /**
     2750         * @constructs wp.customize.Panel
     2751         * @augments   wp.customize~Container
     2752         *
    27592753         * @since 4.1.0
    27602754         *
     
    30213015    });
    30223016
    3023     /**
    3024      * Class wp.customize.ThemesPanel.
    3025      *
    3026      * Custom section for themes that displays without the customize preview.
    3027      *
    3028      * @constructor
    3029      * @augments wp.customize.Panel
    3030      * @augments wp.customize.Container
    3031      */
    3032     api.ThemesPanel = api.Panel.extend({
    3033 
    3034         /**
    3035          * Initialize.
     3017    api.ThemesPanel = api.Panel.extend(/** @lends wp.customize.ThemsPanel.prototype */{
     3018
     3019        /**
     3020         *  Class wp.customize.ThemesPanel.
     3021         *
     3022         * Custom section for themes that displays without the customize preview.
     3023         *
     3024         * @constructs wp.customize.ThemesPanel
     3025         * @augments   wp.customize.Panel
    30363026         *
    30373027         * @since 4.9.0
     
    34523442    });
    34533443
    3454     /**
    3455      * A Customizer Control.
    3456      *
    3457      * A control provides a UI element that allows a user to modify a Customizer Setting.
    3458      *
    3459      * @see PHP class WP_Customize_Control.
    3460      *
    3461      * @class
    3462      * @augments wp.customize.Class
    3463      */
    3464     api.Control = api.Class.extend({
     3444    api.Control = api.Class.extend(/** @lends wp.customize.Control.prototype */{
    34653445        defaultActiveArguments: { duration: 'fast', completeCallback: $.noop },
    34663446
     
    34793459
    34803460        /**
    3481          * Initialize.
     3461         * A Customizer Control.
     3462         *
     3463         * A control provides a UI element that allows a user to modify a Customizer Setting.
     3464         *
     3465         * @see PHP class WP_Customize_Control.
     3466         *
     3467         * @constructs wp.customize.Control
     3468         * @augments   wp.customize.Class
     3469         *
     3470         * @borrows wp.customize~focus as this#focus
     3471         * @borrows wp.customize~Container#activate as this#activate
     3472         * @borrows wp.customize~Container#deactivate as this#deactivate
     3473         * @borrows wp.customize~Container#_toggleActive as this#_toggleActive
    34823474         *
    34833475         * @param {string} id                       - Unique identifier for the control instance.
     
    37453737         * @since 4.6.0
    37463738         * @returns {jQuery} Setting validation message element.
    3747          * @this {wp.customize.Control}
    37483739         */
    37493740        getNotificationsContainerElement: function() {
     
    38893880        },
    38903881
    3891         /**
    3892          * Bring the containing section and panel into view and then
    3893          * this control into view, focusing on the first input.
     3882        /*
     3883         * Documented using @borrows in the constructor.
    38943884         */
    38953885        focus: focus,
     
    39353925        },
    39363926
    3937         /**
    3938          * Shorthand way to enable the active state.
    3939          *
    3940          * @since 4.1.0
    3941          *
    3942          * @param {Object} [params]
    3943          * @returns {Boolean} false if already active
     3927        /*
     3928         * Documented using @borrows in the constructor
    39443929         */
    39453930        activate: Container.prototype.activate,
    39463931
    3947         /**
    3948          * Shorthand way to disable the active state.
    3949          *
    3950          * @since 4.1.0
    3951          *
    3952          * @param {Object} [params]
    3953          * @returns {Boolean} false if already inactive
     3932        /*
     3933         * Documented using @borrows in the constructor
    39543934         */
    39553935        deactivate: Container.prototype.deactivate,
    39563936
    3957         /**
    3958          * Re-use _toggleActive from Container class.
    3959          *
    3960          * @access private
     3937        /*
     3938         * Documented using @borrows in the constructor
    39613939         */
    39623940        _toggleActive: Container.prototype._toggleActive,
     
    41324110     * A colorpicker control.
    41334111     *
    4134      * @class
     4112     * @class    wp.customize.ColorControl
    41354113     * @augments wp.customize.Control
    4136      * @augments wp.customize.Class
    41374114     */
    4138     api.ColorControl = api.Control.extend({
     4115    api.ColorControl = api.Control.extend(/** @lends wp.customize.ColorControl.prototype */{
    41394116        ready: function() {
    41404117            var control = this,
     
    41964173     * A control that implements the media modal.
    41974174     *
    4198      * @class
     4175     * @class    wp.customize.MediaControl
    41994176     * @augments wp.customize.Control
    4200      * @augments wp.customize.Class
    42014177     */
    4202     api.MediaControl = api.Control.extend({
     4178    api.MediaControl = api.Control.extend(/** @lends wp.customize.MediaControl.prototype */{
    42034179
    42044180        /**
     
    43854361     * An upload control, which utilizes the media modal.
    43864362     *
    4387      * @class
     4363     * @class    wp.customize.UploadControl
    43884364     * @augments wp.customize.MediaControl
    4389      * @augments wp.customize.Control
    4390      * @augments wp.customize.Class
    43914365     */
    4392     api.UploadControl = api.MediaControl.extend({
     4366    api.UploadControl = api.MediaControl.extend(/** @lends wp.customize.UploadControl.prototype */{
    43934367
    43944368        /**
     
    44294403     * than what the upload control does in JS.
    44304404     *
    4431      * @class
     4405     * @class    wp.customize.ImageControl
    44324406     * @augments wp.customize.UploadControl
    4433      * @augments wp.customize.MediaControl
    4434      * @augments wp.customize.Control
    4435      * @augments wp.customize.Class
    44364407     */
    4437     api.ImageControl = api.UploadControl.extend({
     4408    api.ImageControl = api.UploadControl.extend(/** @lends wp.customize.ImageControl.prototype */{
    44384409        // @deprecated
    44394410        thumbnailSrc: function() {}
     
    44434414     * A control for uploading background images.
    44444415     *
    4445      * @class
     4416     * @class    wp.customize.BackgroundControl
    44464417     * @augments wp.customize.UploadControl
    4447      * @augments wp.customize.MediaControl
    4448      * @augments wp.customize.Control
    4449      * @augments wp.customize.Class
    44504418     */
    4451     api.BackgroundControl = api.UploadControl.extend({
     4419    api.BackgroundControl = api.UploadControl.extend(/** @lends wp.customize.BackgroundControl.prototype */{
    44524420
    44534421        /**
     
    44804448     * @since 4.7.0
    44814449     *
    4482      * @class
     4450     * @class    wp.customize.BackgroundPositionControl
    44834451     * @augments wp.customize.Control
    4484      * @augments wp.customize.Class
    44854452     */
    4486     api.BackgroundPositionControl = api.Control.extend( {
     4453    api.BackgroundPositionControl = api.Control.extend(/** @lends wp.customize.BackgroundPositionControl.prototype */{
    44874454
    44884455        /**
     
    45194486     * A control for selecting and cropping an image.
    45204487     *
    4521      * @class
     4488     * @class    wp.customize.CroppedImageControl
    45224489     * @augments wp.customize.MediaControl
    4523      * @augments wp.customize.Control
    4524      * @augments wp.customize.Class
    45254490     */
    4526     api.CroppedImageControl = api.MediaControl.extend({
     4491    api.CroppedImageControl = api.MediaControl.extend(/** @lends wp.customize.CroppedImageControl.prototype */{
    45274492
    45284493        /**
     
    47214686     * A control for selecting and cropping Site Icons.
    47224687     *
    4723      * @class
     4688     * @class    wp.customize.SiteIconControl
    47244689     * @augments wp.customize.CroppedImageControl
    4725      * @augments wp.customize.MediaControl
    4726      * @augments wp.customize.Control
    4727      * @augments wp.customize.Class
    47284690     */
    4729     api.SiteIconControl = api.CroppedImageControl.extend({
     4691    api.SiteIconControl = api.CroppedImageControl.extend(/** @lends wp.customize.SiteIconControl.prototype */{
    47304692
    47314693        /**
     
    48424804
    48434805    /**
    4844      * @class
     4806     * @class    wp.customize.HeaderControl
    48454807     * @augments wp.customize.Control
    4846      * @augments wp.customize.Class
    48474808     */
    4848     api.HeaderControl = api.Control.extend({
     4809    api.HeaderControl = api.Control.extend(/** @lends wp.customize.HeaderControl.prototype */{
    48494810        ready: function() {
    48504811            this.btnRemove = $('#customize-control-header_image .actions .remove');
     
    51125073     * wp.customize.ThemeControl
    51135074     *
    5114      * @constructor
     5075     * @class    wp.customize.ThemeControl
    51155076     * @augments wp.customize.Control
    5116      * @augments wp.customize.Class
    51175077     */
    5118     api.ThemeControl = api.Control.extend({
     5078    api.ThemeControl = api.Control.extend(/** @lends wp.customize.ThemeControl.prototype */{
    51195079
    51205080        touchDrag: false,
     
    52645224     * @since 4.9.0
    52655225     *
    5266      * @constructor
     5226     * @class    wp.customize.CodeEditorControl
    52675227     * @augments wp.customize.Control
    5268      * @augments wp.customize.Class
    52695228     */
    5270     api.CodeEditorControl = api.Control.extend({
     5229    api.CodeEditorControl = api.Control.extend(/** @lends wp.customize.CodeEditorControl.prototype */{
    52715230
    52725231        /**
     
    55855544     *
    55865545     * @since 4.9.0
    5587      * @constructor
     5546     * @class    wp.customize.DateTimeControl
    55885547     * @augments wp.customize.Control
    5589      * @augments wp.customize.Class
    55905548     */
    5591     api.DateTimeControl = api.Control.extend({
     5549    api.DateTimeControl = api.Control.extend(/** @lends wp.customize.DateTimeControl.prototype */{
    55925550
    55935551        /**
     
    59405898     *
    59415899     * @since 4.9.0
    5942      * @constructor
     5900     * @class    wp.customize.PreviewLinkControl
    59435901     * @augments wp.customize.Control
    5944      * @augments wp.customize.Class
    59455902     */
    5946     api.PreviewLinkControl = api.Control.extend({
     5903    api.PreviewLinkControl = api.Control.extend(/** @lends wp.customize.PreviewLinkControl.prototype */{
    59475904
    59485905        defaults: _.extend( {}, api.Control.prototype.defaults, {
     
    60586015    });
    60596016
    6060     // Change objects contained within the main customize object to Settings.
     6017    /**
     6018     * Change objects contained within the main customize object to Settings.
     6019     *
     6020     * @alias wp.customize.defaultConstructor
     6021     */
    60616022    api.defaultConstructor = api.Setting;
    60626023
     
    60646025     * Callback for resolved controls.
    60656026     *
    6066      * @callback deferredControlsCallback
    6067      * @param {wp.customize.Control[]} Resolved controls.
     6027     * @callback wp.customize.deferredControlsCallback
     6028     * @param {wp.customize.Control[]} controls Resolved controls.
    60686029     */
    60696030
    60706031    /**
    60716032     * Collection of all registered controls.
     6033     *
     6034     * @alias wp.customize.control
    60726035     *
    60736036     * @since 3.4.0
     
    61236086     * Callback for resolved sections.
    61246087     *
    6125      * @callback deferredSectionsCallback
    6126      * @param {wp.customize.Section[]} Resolved sections.
     6088     * @callback wp.customize.deferredSectionsCallback
     6089     * @param {wp.customize.Section[]} sections Resolved sections.
    61276090     */
    61286091
    61296092    /**
    61306093     * Collection of all registered sections.
     6094     *
     6095     * @alias wp.customize.section
    61316096     *
    61326097     * @since 3.4.0
     
    61556120     * Callback for resolved panels.
    61566121     *
    6157      * @callback deferredPanelsCallback
    6158      * @param {wp.customize.Panel[]} Resolved panels.
     6122     * @callback wp.customize.deferredPanelsCallback
     6123     * @param {wp.customize.Panel[]} panels Resolved panels.
    61596124     */
    61606125
    61616126    /**
    61626127     * Collection of all registered panels.
     6128     *
     6129     * @alias wp.customize.panel
    61636130     *
    61646131     * @since 4.0.0
     
    61876154     * Callback for resolved notifications.
    61886155     *
    6189      * @callback deferredNotificationsCallback
    6190      * @param {wp.customize.Notification[]} Resolved notifications.
     6156     * @callback wp.customize.deferredNotificationsCallback
     6157     * @param {wp.customize.Notification[]} notifications Resolved notifications.
    61916158     */
    61926159
    61936160    /**
    61946161     * Collection of all global notifications.
     6162     *
     6163     * @alias wp.customize.notifications
    61956164     *
    61966165     * @since 4.9.0
     
    62246193    api.notifications = new api.Notifications();
    62256194
    6226     /**
    6227      * An object that fetches a preview in the background of the document, which
    6228      * allows for seamless replacement of an existing preview.
    6229      *
    6230      * @class
    6231      * @augments wp.customize.Messenger
    6232      * @augments wp.customize.Class
    6233      * @mixes wp.customize.Events
    6234      */
    6235     api.PreviewFrame = api.Messenger.extend({
     6195    api.PreviewFrame = api.Messenger.extend(/** @lends wp.customize.PreviewFrame.prototype */{
    62366196        sensitivity: null, // Will get set to api.settings.timeouts.previewFrameSensitivity.
    62376197
    62386198        /**
    6239          * Initialize the PreviewFrame.
     6199         * An object that fetches a preview in the background of the document, which
     6200         * allows for seamless replacement of an existing preview.
     6201         *
     6202         * @constructs wp.customize.PreviewFrame
     6203         * @augments   wp.customize.Messenger
    62406204         *
    62416205         * @param {object} params.container
     
    64556419     * Set the document title of the customizer.
    64566420     *
     6421     * @alias wp.customize.setDocumentTitle
     6422     *
    64576423     * @since 4.1.0
    64586424     *
     
    64676433    };
    64686434
    6469     /**
    6470      * @class
    6471      * @augments wp.customize.Messenger
    6472      * @augments wp.customize.Class
    6473      * @mixes wp.customize.Events
    6474      */
    6475     api.Previewer = api.Messenger.extend({
     6435    api.Previewer = api.Messenger.extend(/** @lends wp.customize.Previewer.prototype */{
    64766436        refreshBuffer: null, // Will get set to api.settings.timeouts.windowRefresh.
    64776437
    64786438        /**
     6439         * @constructs wp.customize.Previewer
     6440         * @augments   wp.customize.Messenger
     6441         *
    64796442         * @param {array}  params.allowedUrls
    64806443         * @param {string} params.container   A selector or jQuery element for the preview
     
    69306893     * Add notifications to the settings and focus on the first control that has an invalid setting.
    69316894     *
     6895     * @alias wp.customize._handleSettingValidities
     6896     *
    69326897     * @since 4.6.0
    69336898     * @private
     
    70056970     * Find all controls associated with the given settings.
    70066971     *
     6972     * @alias wp.customize.findControlsForSettings
     6973     *
    70076974     * @since 4.6.0
    70086975     * @param {string[]} settingIds Setting IDs.
     
    70256992    /**
    70266993     * Sort panels, sections, controls by priorities. Hide empty sections and panels.
     6994     *
     6995     * @alias wp.customize.reflowPaneContents
    70276996     *
    70286997     * @since 4.1.0
     
    73907359        });
    73917360
    7392         // Initialize Previewer
     7361        /**
     7362         * Initialize Previewer
     7363         *
     7364         * @alias wp.customize.previewer
     7365         */
    73937366        api.previewer = new api.Previewer({
    73947367            container:   '#customize-preview',
     
    73967369            previewUrl:  api.settings.url.preview,
    73977370            allowedUrls: api.settings.url.allowed
    7398         }, {
     7371        },/** @lends wp.customize.previewer */{
    73997372
    74007373            nonce: api.settings.nonce,
     
    80998072        ( function checkAndDisplayLockNotice() {
    81008073
    8101             /**
    8102              * A notification that is displayed in a full-screen overlay with information about the locked changeset.
    8103              *
    8104              * @since 4.9.0
    8105              * @class
    8106              * @augments wp.customize.Notification
    8107              * @augments wp.customize.OverlayNotification
    8108              */
    8109             var LockedNotification = api.OverlayNotification.extend({
     8074            var LockedNotification = api.OverlayNotification.extend(/** @lends wp.customize~LockedNotification.prototype */{
    81108075
    81118076                /**
     
    81248089
    81258090                /**
    8126                  * Initialize.
     8091                 * A notification that is displayed in a full-screen overlay with information about the locked changeset.
     8092                 *
     8093                 * @constructs wp.customize~LockedNotification
     8094                 * @augments   wp.customize.OverlayNotification
    81278095                 *
    81288096                 * @since 4.9.0
  • trunk/src/wp-admin/js/customize-nav-menus.js

    r42153 r42403  
    1414    };
    1515
     16    /**
     17     * @namespace wp.customize.Menus
     18     */
    1619    api.Menus = api.Menus || {};
    1720
     
    3639     * serve as placeholders until Save & Publish happens.
    3740     *
     41     * @alias wp.customize.Menus.generatePlaceholderAutoIncrementId
     42     *
    3843     * @return {number}
    3944     */
     
    4752     * A single available menu item model. See PHP's WP_Customize_Nav_Menu_Item_Setting class.
    4853     *
    49      * @constructor
     54     * @class    wp.customize.Menus.AvailableItemModel
    5055     * @augments Backbone.Model
    5156     */
     
    6267     * Collection for available menu item models.
    6368     *
    64      * @constructor
    65      * @augments Backbone.Model
     69     * @class    wp.customize.Menus.AvailableItemCollection
     70     * @augments Backbone.Collection
    6671     */
    67     api.Menus.AvailableItemCollection = Backbone.Collection.extend({
     72    api.Menus.AvailableItemCollection = Backbone.Collection.extend(/** @lends wp.customize.Menus.AvailableItemCollection.prototype */{
    6873        model: api.Menus.AvailableItemModel,
    6974
     
    8590     *
    8691     * @since 4.7.0
    87      * @access public
     92     * @alias wp.customize.Menus.insertAutoDraftPost
    8893     *
    8994     * @param {object} params - Parameters for the draft post to create.
     
    142147    };
    143148
    144     /**
    145      * wp.customize.Menus.AvailableMenuItemsPanelView
    146      *
    147      * View class for the available menu items panel.
    148      *
    149      * @constructor
    150      * @augments wp.Backbone.View
    151      * @augments Backbone.View
    152      */
    153     api.Menus.AvailableMenuItemsPanelView = wp.Backbone.View.extend({
     149    api.Menus.AvailableMenuItemsPanelView = wp.Backbone.View.extend(/** @lends wp.customize.Menus.AvailableMenuItemsPanelView.prototype */{
    154150
    155151        el: '#available-menu-items',
     
    182178        addingNew: false,
    183179
     180        /**
     181         * wp.customize.Menus.AvailableMenuItemsPanelView
     182         *
     183         * View class for the available menu items panel.
     184         *
     185         * @constructs wp.customize.Menus.AvailableMenuItemsPanelView
     186         * @augments   wp.Backbone.View
     187         */
    184188        initialize: function() {
    185189            var self = this;
     
    754758     * Note that 'menus' must match the WP_Customize_Menu_Panel::$type.
    755759     *
    756      * @constructor
     760     * @class    wp.customize.Menus.MenusPanel
    757761     * @augments wp.customize.Panel
    758762     */
    759     api.Menus.MenusPanel = api.Panel.extend({
     763    api.Menus.MenusPanel = api.Panel.extend(/** @lends wp.customize.Menus.MenusPanel.prototype */{
    760764
    761765        attachEvents: function() {
     
    886890     * Note that 'nav_menu' must match the WP_Customize_Menu_Section::$type.
    887891     *
    888      * @constructor
     892     * @class    wp.customize.Menus.MenuSection
    889893     * @augments wp.customize.Section
    890894     */
    891     api.Menus.MenuSection = api.Section.extend({
     895    api.Menus.MenuSection = api.Section.extend(/** @lends wp.customize.Menus.MenuSection.prototype */{
    892896
    893897        /**
     
    12131217     * Customizer section for new menus.
    12141218     *
    1215      * @constructor
     1219     * @class    wp.customize.Menus.NewMenuSection
    12161220     * @augments wp.customize.Section
    12171221     */
    1218     api.Menus.NewMenuSection = api.Section.extend({
     1222    api.Menus.NewMenuSection = api.Section.extend(/** @lends wp.customize.Menus.NewMenuSection.prototype */{
    12191223
    12201224        /**
     
    14521456     * Note that 'nav_menu_location' must match the WP_Customize_Nav_Menu_Location_Control::$type.
    14531457     *
    1454      * @constructor
     1458     * @class    wp.customize.Menus.MenuLocationControl
    14551459     * @augments wp.customize.Control
    14561460     */
    1457     api.Menus.MenuLocationControl = api.Control.extend({
     1461    api.Menus.MenuLocationControl = api.Control.extend(/** @lends wp.customize.Menus.MenuLocationControl.prototype */{
    14581462        initialize: function( id, options ) {
    14591463            var control = this,
     
    15301534    });
    15311535
    1532     /**
    1533      * wp.customize.Menus.MenuItemControl
    1534      *
    1535      * Customizer control for menu items.
    1536      * Note that 'menu_item' must match the WP_Customize_Menu_Item_Control::$type.
    1537      *
    1538      * @constructor
    1539      * @augments wp.customize.Control
    1540      */
    1541     api.Menus.MenuItemControl = api.Control.extend({
    1542 
    1543         /**
    1544          * @inheritdoc
     1536    api.Menus.MenuItemControl = api.Control.extend(/** @lends wp.customize.Menus.MenuItemControl.prototype */{
     1537
     1538        /**
     1539         * wp.customize.Menus.MenuItemControl
     1540         *
     1541         * Customizer control for menu items.
     1542         * Note that 'menu_item' must match the WP_Customize_Menu_Item_Control::$type.
     1543         *
     1544         * @constructs wp.customize.Menus.MenuItemControl
     1545         * @augments   wp.customize.Control
     1546         *
     1547         * @inheritDoc
    15451548         */
    15461549        initialize: function( id, options ) {
     
    23252328     * Customizer control for a nav menu's name.
    23262329     *
    2327      * @constructor
     2330     * @class    wp.customize.Menus.MenuNameControl
    23282331     * @augments wp.customize.Control
    23292332     */
    2330     api.Menus.MenuNameControl = api.Control.extend({
     2333    api.Menus.MenuNameControl = api.Control.extend(/** @lends wp.customize.Menus.MenuNameControl.prototype */{
    23312334
    23322335        ready: function() {
     
    23652368     *
    23662369     * @since 4.9.0
    2367      * @constructor
     2370     * @class    wp.customize.Menus.MenuLocationsControl
    23682371     * @augments wp.customize.Control
    23692372     */
    2370     api.Menus.MenuLocationsControl = api.Control.extend({
     2373    api.Menus.MenuLocationsControl = api.Control.extend(/** @lends wp.customize.Menus.MenuLocationsControl.prototype */{
    23712374
    23722375        /**
     
    24382441     * Customizer control for a nav menu's auto add.
    24392442     *
    2440      * @constructor
     2443     * @class    wp.customize.Menus.MenuAutoAddControl
    24412444     * @augments wp.customize.Control
    24422445     */
    2443     api.Menus.MenuAutoAddControl = api.Control.extend({
     2446    api.Menus.MenuAutoAddControl = api.Control.extend(/** @lends wp.customize.Menus.MenuAutoAddControl.prototype */{
    24442447
    24452448        ready: function() {
     
    24912494     * Note that 'nav_menu' must match the WP_Menu_Customize_Control::$type
    24922495     *
    2493      * @constructor
     2496     * @class    wp.customize.Menus.MenuControl
    24942497     * @augments wp.customize.Control
    24952498     */
    2496     api.Menus.MenuControl = api.Control.extend({
     2499    api.Menus.MenuControl = api.Control.extend(/** @lends wp.customize.Menus.MenuControl.prototype */{
    24972500        /**
    24982501         * Set up the control.
     
    30223025    } );
    30233026
    3024     /**
    3025      * wp.customize.Menus.NewMenuControl
    3026      *
    3027      * Customizer control for creating new menus and handling deletion of existing menus.
    3028      * Note that 'new_menu' must match the WP_Customize_New_Menu_Control::$type.
    3029      *
    3030      * @constructor
    3031      * @augments wp.customize.Control
    3032      * @deprecated 4.9.0 This class is no longer used due to new menu creation UX.
    3033      */
    3034     api.Menus.NewMenuControl = api.Control.extend({
    3035 
    3036         /**
    3037          * Initialize.
    3038          *
    3039          * @deprecated 4.9.0
     3027    api.Menus.NewMenuControl = api.Control.extend(/** @lends wp.customize.Menus.NewMenuControl.prototype */{
     3028
     3029        /**
     3030         * wp.customize.Menus.NewMenuControl
     3031         *
     3032         * Customizer control for creating new menus and handling deletion of existing menus.
     3033         * Note that 'new_menu' must match the WP_Customize_New_Menu_Control::$type.
     3034         *
     3035         * @constructs wp.customize.Menus.NewMenuControl
     3036         * @augments   wp.customize.Control
     3037         *
     3038         * @deprecated 4.9.0 This class is no longer used due to new menu creation UX.
    30403039         */
    30413040        initialize: function() {
     
    31673166     * nav menus and items are properly re-added with their newly-assigned IDs.
    31683167     *
     3168     * @alias wp.customize.Menus.applySavedData
     3169     *
    31693170     * @param {object} data
    31703171     * @param {array} data.nav_menu_updates
     
    33973398     * Focus a menu item control.
    33983399     *
     3400     * @alias wp.customize.Menus.focusMenuItemControl
     3401     *
    33993402     * @param {string} menuItemId
    34003403     */
     
    34093412     * Get the control for a given menu.
    34103413     *
     3414     * @alias wp.customize.Menus.getMenuControl
     3415     *
    34113416     * @param menuId
    34123417     * @return {wp.customize.controlConstructor.menus[]}
     
    34193424     * Given a menu item ID, get the control associated with it.
    34203425     *
     3426     * @alias wp.customize.Menus.getMenuItemControl
     3427     *
    34213428     * @param {string} menuItemId
    34223429     * @return {object|null}
     
    34273434
    34283435    /**
     3436     * @alias wp.customize.Menus~menuItemIdToSettingId
     3437     *
    34293438     * @param {String} menuItemId
    34303439     */
     
    34363445     * Apply sanitize_text_field()-like logic to the supplied name, returning a
    34373446     * "unnammed" fallback string if the name is then empty.
     3447     *
     3448     * @alias wp.customize.Menus~displayNavMenuName
    34383449     *
    34393450     * @param {string} name
  • trunk/src/wp-admin/js/customize-widgets.js

    r41860 r42403  
    88        l10n;
    99
     10    /**
     11     * @namespace wp.customize.Widgets
     12     */
    1013    api.Widgets = api.Widgets || {};
    1114    api.Widgets.savedWidgetIds = {};
     
    2023     * A single widget model.
    2124     *
    22      * @constructor
     25     * @class    wp.customize.Widgets.WidgetModel
    2326     * @augments Backbone.Model
    2427     */
    25     api.Widgets.WidgetModel = Backbone.Model.extend({
     28    api.Widgets.WidgetModel = Backbone.Model.extend(/** @lends wp.customize.Widgets.WidgetModel.prototype */{
    2629        id: null,
    2730        temp_id: null,
     
    4649     * Collection for widget models.
    4750     *
    48      * @constructor
    49      * @augments Backbone.Model
     51     * @class    wp.customize.Widgets.WidgetCollection
     52     * @augments Backbone.Collection
    5053     */
    51     api.Widgets.WidgetCollection = Backbone.Collection.extend({
     54    api.Widgets.WidgetCollection = Backbone.Collection.extend(/** @lends wp.customize.Widgets.WidgetCollection.prototype */{
    5255        model: api.Widgets.WidgetModel,
    5356
     
    104107     * A single sidebar model.
    105108     *
    106      * @constructor
     109     * @class    wp.customize.Widgets.SidebarModel
    107110     * @augments Backbone.Model
    108111     */
    109     api.Widgets.SidebarModel = Backbone.Model.extend({
     112    api.Widgets.SidebarModel = Backbone.Model.extend(/** @lends wp.customize.Widgets.SidebarModel.prototype */{
    110113        after_title: null,
    111114        after_widget: null,
     
    124127     * Collection for sidebar models.
    125128     *
    126      * @constructor
     129     * @class    wp.customize.Widgets.SidebarCollection
    127130     * @augments Backbone.Collection
    128131     */
    129     api.Widgets.SidebarCollection = Backbone.Collection.extend({
     132    api.Widgets.SidebarCollection = Backbone.Collection.extend(/** @lends wp.customize.Widgets.SidebarCollection.prototype */{
    130133        model: api.Widgets.SidebarModel
    131134    });
    132135    api.Widgets.registeredSidebars = new api.Widgets.SidebarCollection( api.Widgets.data.registeredSidebars );
    133136
    134     /**
    135      * wp.customize.Widgets.AvailableWidgetsPanelView
    136      *
    137      * View class for the available widgets panel.
    138      *
    139      * @constructor
    140      * @augments wp.Backbone.View
    141      * @augments Backbone.View
    142      */
    143     api.Widgets.AvailableWidgetsPanelView = wp.Backbone.View.extend({
     137    api.Widgets.AvailableWidgetsPanelView = wp.Backbone.View.extend(/** @lends wp.customize.Widgets.AvailableWidgetsPanelView.prototype */{
    144138
    145139        el: '#available-widgets',
     
    163157        searchMatchesCount: null,
    164158
     159        /**
     160         * View class for the available widgets panel.
     161         *
     162         * @constructs wp.customize.Widgets.AvailableWidgetsPanelView
     163         * @augments   wp.Backbone.View
     164         */
    165165        initialize: function() {
    166166            var self = this;
     
    198198        },
    199199
    200         // Performs a search and handles selected widget
     200        /**
     201         * Performs a search and handles selected widget.
     202         */
    201203        search: function( event ) {
    202204            var firstVisible;
     
    243245        },
    244246
    245         // Update the count of the available widgets that have the `search_matched` attribute.
     247        /**
     248         * Updates the count of the available widgets that have the `search_matched` attribute.
     249         */
    246250        updateSearchMatchesCount: function() {
    247251            this.searchMatchesCount = this.collection.where({ search_matched: true }).length;
    248252        },
    249253
    250         // Send a message to the aria-live region to announce how many search results.
     254        /**
     255         * Sends a message to the aria-live region to announce how many search results.
     256         */
    251257        announceSearchMatches: _.debounce( function() {
    252258            var message = l10n.widgetsFound.replace( '%d', this.searchMatchesCount ) ;
     
    259265        }, 500 ),
    260266
    261         // Changes visibility of available widgets
     267        /**
     268         * Changes visibility of available widgets.
     269         */
    262270        updateList: function() {
    263271            this.collection.each( function( widget ) {
     
    270278        },
    271279
    272         // Highlights a widget
     280        /**
     281         * Highlights a widget.
     282         */
    273283        select: function( widgetTpl ) {
    274284            this.selected = $( widgetTpl );
     
    277287        },
    278288
    279         // Highlights a widget on focus
     289        /**
     290         * Highlights a widget on focus.
     291         */
    280292        focus: function( event ) {
    281293            this.select( $( event.currentTarget ) );
    282294        },
    283295
    284         // Submit handler for keypress and click on widget
     296        /**
     297         * Handles submit for keypress and click on widget.
     298         */
    285299        _submit: function( event ) {
    286300            // Only proceed with keypress if it is Enter or Spacebar
     
    292306        },
    293307
    294         // Adds a selected widget to the sidebar
     308        /**
     309         * Adds a selected widget to the sidebar.
     310         */
    295311        submit: function( widgetTpl ) {
    296312            var widgetId, widget, widgetFormControl;
     
    320336        },
    321337
    322         // Opens the panel
     338        /**
     339         * Opens the panel.
     340         */
    323341        open: function( sidebarControl ) {
    324342            this.currentSidebarControl = sidebarControl;
     
    347365        },
    348366
    349         // Closes the panel
     367        /**
     368         * Closes the panel.
     369         */
    350370        close: function( options ) {
    351371            options = options || {};
     
    363383        },
    364384
    365         // Add keyboard accessiblity to the panel
     385        /**
     386         * Adds keyboard accessiblity to the panel.
     387         */
    366388        keyboardAccessible: function( event ) {
    367389            var isEnter = ( event.which === 13 ),
     
    425447     * Other widgets may provide their own update handlers by adding
    426448     * listeners for the widget-synced event.
     449     *
     450     * @alias    wp.customize.Widgets.formSyncHandlers
    427451     */
    428452    api.Widgets.formSyncHandlers = {
     
    447471    };
    448472
    449     /**
    450      * wp.customize.Widgets.WidgetControl
    451      *
    452      * Customizer control for widgets.
    453      * Note that 'widget_form' must match the WP_Widget_Form_Customize_Control::$type
    454      *
    455      * @constructor
    456      * @augments wp.customize.Control
    457      */
    458     api.Widgets.WidgetControl = api.Control.extend({
     473    api.Widgets.WidgetControl = api.Control.extend(/** @lends wp.customize.Widgets.WidgetControl.prototype */{
    459474        defaultExpandedArguments: {
    460475            duration: 'fast',
     
    463478
    464479        /**
     480         * wp.customize.Widgets.WidgetControl
     481         *
     482         * Customizer control for widgets.
     483         * Note that 'widget_form' must match the WP_Widget_Form_Customize_Control::$type
     484         *
    465485         * @since 4.1.0
     486         *
     487         * @constructs wp.customize.Widgets.WidgetControl
     488         * @augments   wp.customize.Control
    466489         */
    467490        initialize: function( id, options ) {
     
    944967         * @param {Boolean}   active
    945968         * @param {Object}    args
    946          * @param {Callback}  args.completeCallback
     969         * @param {function}  args.completeCallback
    947970         */
    948971        onChangeActive: function ( active, args ) {
     
    15751598     *
    15761599     * @since 4.4.0
     1600     *
     1601     * @class    wp.customize.Widgets.WidgetsPanel
     1602     * @augments wp.customize.Panel
    15771603     */
    1578     api.Widgets.WidgetsPanel = api.Panel.extend({
     1604    api.Widgets.WidgetsPanel = api.Panel.extend(/** @lends wp.customize.Widgets.WigetsPanel.prototype */{
    15791605
    15801606        /**
     
    16961722     *
    16971723     * @since 4.1.0
     1724     *
     1725     * @class    wp.customize.Widgets.SidebarSection
     1726     * @augments wp.customize.Section
    16981727     */
    1699     api.Widgets.SidebarSection = api.Section.extend({
     1728    api.Widgets.SidebarSection = api.Section.extend(/** @lends wp.customize.Widgets.SidebarSection.prototype */{
    17001729
    17011730        /**
     
    17231752     * @since 3.9.0
    17241753     *
    1725      * @constructor
     1754     * @class    wp.customize.Widgets.SidebarControl
    17261755     * @augments wp.customize.Control
    17271756     */
    1728     api.Widgets.SidebarControl = api.Control.extend({
     1757    api.Widgets.SidebarControl = api.Control.extend(/** @lends wp.customize.Widgets.SidebarControl.prototype */{
    17291758
    17301759        /**
  • trunk/src/wp-admin/js/editor.js

    r42183 r42403  
    12371237
    12381238    /**
    1239      * @namespace {SwitchEditors} switchEditors
    12401239     * Expose the switch editors to be used globally.
     1240     *
     1241     * @namespace switchEditors
    12411242     */
    12421243    window.switchEditors = new SwitchEditors();
  • trunk/src/wp-admin/js/image-edit.js

    r40020 r42403  
    614614            /**
    615615             * @summary Sets the CSS styles and binds events for locking the aspect ratio.
     616             *
     617             * @ignore
    616618             *
    617619             * @param {jQuery} img The preview image.
     
    646648             * @summary Event triggered when starting a selection.
    647649             *
     650             * @ignore
     651             *
    648652             * @returns {void}
    649653             */
     
    653657            /**
    654658             * @summary Event triggered when the selection is ended.
     659             *
     660             * @ignore
    655661             *
    656662             * @param {object} img jQuery object representing the image.
     
    665671            /**
    666672             * @summary Event triggered when the selection changes.
     673             *
     674             * @ignore
    667675             *
    668676             * @param {object} img jQuery object representing the image.
  • trunk/src/wp-admin/js/inline-edit-post.js

    r41684 r42403  
    1111 * Manages the quick edit and bulk edit windows for editing posts or pages.
    1212 *
    13  * @namespace
     13 * @namespace inlineEditPost
    1414 *
    1515 * @since 2.7.0
    16  * @access public
    1716 *
    1817 * @type {Object}
  • trunk/src/wp-admin/js/media.js

    r40915 r42403  
    66 * @since 2.7.0
    77 *
    8  * @global
    9  * @namespace
     8 * @namespace findPosts
    109 *
    1110 * @requires jQuery
  • trunk/src/wp-admin/js/nav-menu.js

    r41227 r42403  
    1111/* global menus, postboxes, columns, isRtl, navMenuL10n, ajaxurl */
    1212
     13/**
     14 * Contains all the functions to handle WordPress navigation menus administration.
     15 *
     16 * @namespace
     17 */
    1318var wpNavMenu;
    1419
     
    168173                 * Adds selected menu items to the menu.
    169174                 *
     175                 * @ignore
     176                 *
    170177                 * @param jQuery metabox The metabox jQuery object.
    171178                 */
  • trunk/src/wp-admin/js/plugin-install.js

    r41356 r42403  
    22
    33/**
    4  * Functionality for the plugin install screens.
     4 * @file Functionality for the plugin install screens.
    55 */
    66var tb_position;
  • trunk/src/wp-admin/js/post.js

    r38893 r42403  
    55 * Contains all dynamic functionality needed on post and term pages.
    66 *
    7  * @summary Control page and term functionality.
     7 * @file Control page and term functionality.
    88 */
    99
     
    3232         * Fetch comments using AJAX and display them in the box.
    3333         *
     34         * @memberof commentsBox
     35         *
    3436         * @param {int} total Total number of comments for this post.
    3537         * @param {int} num   Optional. Number of comments to fetch, defaults to 20.
    3638         * @returns {boolean} Always returns false.
    37          *
    38          * @memberof commentsBox
    3939         */
    4040        get : function(total, num) {
     
    663663             * Add current post_ID to request to fetch custom fields
    664664             *
     665             * @ignore
     666             *
    665667             * @param {Object} s Request object.
    666668             *
     
    673675            /**
    674676             * Show the listing of custom fields after fetching.
     677             *
     678             * @ignore
    675679             */
    676680            addAfter: function() {
     
    689693        /**
    690694         * When the visibility of a post changes sub-options should be shown or hidden.
     695         *
     696         * @ignore
    691697         *
    692698         * @returns void
     
    711717        /**
    712718         * Make sure all labels represent the current settings.
     719         *
     720         * @ignore
    713721         *
    714722         * @returns {boolean} False when an invalid timestamp has been selected, otherwise True.
  • trunk/src/wp-admin/js/postbox.js

    r38643 r42403  
    8282             *
    8383             * @since 4.0.0
     84             * @ignore
     85             *
    8486             * @event postboxes#postbox-toggled
    8587             * @type {Object}
     
    138140             *
    139141             * @since 2.7.0
     142             * @ignore
     143             *
    140144             * @fires postboxes#postbox-toggled
    141145             *
     
    384388             *
    385389             * @since 4.0.0
     390             * @ignore
     391             *
    386392             * @event postboxes#postboxes-columnchange
    387393             */
  • trunk/src/wp-admin/js/updates.js

    r42046 r42403  
    33 *
    44 * @version 4.2.0
    5  *
    6  * @package WordPress
    7  * @subpackage Administration
    85 */
    96
     
    3936     * @since 4.2.0
    4037     *
    41      * @type {object}
     38     * @namespace wp.updates
    4239     */
    4340    wp.updates = {};
     
    8582     * @since 4.6.0 Added `available` property to indicate whether credentials have been provided.
    8683     *
    87      * @type {object} filesystemCredentials                    Holds filesystem credentials.
    88      * @type {object} filesystemCredentials.ftp                Holds FTP credentials.
    89      * @type {string} filesystemCredentials.ftp.host           FTP host. Default empty string.
    90      * @type {string} filesystemCredentials.ftp.username       FTP user name. Default empty string.
    91      * @type {string} filesystemCredentials.ftp.password       FTP password. Default empty string.
    92      * @type {string} filesystemCredentials.ftp.connectionType Type of FTP connection. 'ssh', 'ftp', or 'ftps'.
    93      *                                                         Default empty string.
    94      * @type {object} filesystemCredentials.ssh                Holds SSH credentials.
    95      * @type {string} filesystemCredentials.ssh.publicKey      The public key. Default empty string.
    96      * @type {string} filesystemCredentials.ssh.privateKey     The private key. Default empty string.
    97      * @type {string} filesystemCredentials.fsNonce            Filesystem credentials form nonce.
    98      * @type {bool}   filesystemCredentials.available          Whether filesystem credentials have been provided.
    99      *                                                         Default 'false'.
     84     * @type {Object}
     85     * @property {Object} filesystemCredentials.ftp                Holds FTP credentials.
     86     * @property {string} filesystemCredentials.ftp.host           FTP host. Default empty string.
     87     * @property {string} filesystemCredentials.ftp.username       FTP user name. Default empty string.
     88     * @property {string} filesystemCredentials.ftp.password       FTP password. Default empty string.
     89     * @property {string} filesystemCredentials.ftp.connectionType Type of FTP connection. 'ssh', 'ftp', or 'ftps'.
     90     *                                                             Default empty string.
     91     * @property {Object} filesystemCredentials.ssh                Holds SSH credentials.
     92     * @property {string} filesystemCredentials.ssh.publicKey      The public key. Default empty string.
     93     * @property {string} filesystemCredentials.ssh.privateKey     The private key. Default empty string.
     94     * @property {string} filesystemCredentials.fsNonce            Filesystem credentials form nonce.
     95     * @property {bool}   filesystemCredentials.available          Whether filesystem credentials have been provided.
     96     *                                                             Default 'false'.
    10097     */
    10198    wp.updates.filesystemCredentials = {
     
    129126     * @since 4.6.0
    130127     *
    131      * @type {function} A function that lazily-compiles the template requested.
     128     * @type {function}
    132129     */
    133130    wp.updates.adminNotice = wp.template( 'wp-updates-admin-notice' );
     
    408405     * @since 4.6.0 More accurately named `updatePluginSuccess`.
    409406     *
    410      * @typedef {object} updatePluginSuccess
    411407     * @param {object} response            Response from the server.
    412408     * @param {string} response.slug       Slug of the plugin to be updated.
     
    453449     * @since 4.6.0 More accurately named `updatePluginError`.
    454450     *
    455      * @typedef {object} updatePluginError
    456451     * @param {object}  response              Response from the server.
    457452     * @param {string}  response.slug         Slug of the plugin to be updated.
     
    575570     * @since 4.6.0
    576571     *
    577      * @typedef {object} installPluginSuccess
    578572     * @param {object} response             Response from the server.
    579573     * @param {string} response.slug        Slug of the installed plugin.
     
    611605     * @since 4.6.0
    612606     *
    613      * @typedef {object} installPluginError
    614607     * @param {object}  response              Response from the server.
    615608     * @param {string}  response.slug         Slug of the plugin to be installed.
     
    662655     * @since 4.6.0
    663656     *
    664      * @typedef {object} installImporterSuccess
    665657     * @param {object} response             Response from the server.
    666658     * @param {string} response.slug        Slug of the installed plugin.
     
    694686     * @since 4.6.0
    695687     *
    696      * @typedef {object} installImporterError
    697688     * @param {object}  response              Response from the server.
    698689     * @param {string}  response.slug         Slug of the plugin to be installed.
     
    769760     * @since 4.6.0
    770761     *
    771      * @typedef {object} deletePluginSuccess
    772      * @param {object} response            Response from the server.
     762     * @param {Object} response            Response from the server.
    773763     * @param {string} response.slug       Slug of the plugin that was deleted.
    774764     * @param {string} response.plugin     Base name of the plugin that was deleted.
     
    784774                columnCount      = $form.find( 'thead th:not(.hidden), thead td' ).length,
    785775                pluginDeletedRow = wp.template( 'item-deleted-row' ),
    786                 /** @type {object} plugins Base names of plugins in their different states. */
     776                /**
     777                 * Plugins Base names of plugins in their different states.
     778                 *
     779                 * @type {Object}
     780                 */
    787781                plugins          = settings.plugins;
    788782
     
    859853     * @since 4.6.0
    860854     *
    861      * @typedef {object} deletePluginError
    862855     * @param {object}  response              Response from the server.
    863856     * @param {string}  response.slug         Slug of the plugin to be deleted.
     
    972965     * @since 4.6.0
    973966     *
    974      * @typedef {object} updateThemeSuccess
    975967     * @param {object} response
    976968     * @param {string} response.slug       Slug of the theme to be updated.
     
    10341026     * @since 4.6.0
    10351027     *
    1036      * @typedef {object} updateThemeError
    10371028     * @param {object} response              Response from the server.
    10381029     * @param {string} response.slug         Slug of the theme to be updated.
     
    11201111     * @since 4.6.0
    11211112     *
    1122      * @typedef {object} installThemeSuccess
    11231113     * @param {object} response              Response from the server.
    11241114     * @param {string} response.slug         Slug of the theme to be installed.
     
    11711161     * @since 4.6.0
    11721162     *
    1173      * @typedef {object} installThemeError
    11741163     * @param {object} response              Response from the server.
    11751164     * @param {string} response.slug         Slug of the theme to be installed.
     
    12691258     * @since 4.6.0
    12701259     *
    1271      * @typedef {object} deleteThemeSuccess
    12721260     * @param {object} response      Response from the server.
    12731261     * @param {string} response.slug Slug of the theme that was deleted.
     
    13281316     * @since 4.6.0
    13291317     *
    1330      * @typedef {object} deleteThemeError
    13311318     * @param {object} response              Response from the server.
    13321319     * @param {string} response.slug         Slug of the theme to be deleted.
     
    16021589     * @since 4.6.0
    16031590     *
    1604      * @typedef {object} maybeHandleCredentialError
    16051591     * @param {object} response              Response from the server.
    16061592     * @param {string} response.errorCode    Error code for the error that occurred.
  • trunk/src/wp-admin/js/widgets.js

    r41814 r42403  
    246246             * Open Sidebar when a Widget gets dragged over it.
    247247             *
     248             * @ignore
     249             *
    248250             * @param {object} event jQuery event object.
    249251             */
     
    268270            /**
    269271             * Close Sidebar when the Widget gets dragged out of it.
     272             *
     273             * @ignore
    270274             *
    271275             * @param {object} event jQuery event object.
  • trunk/src/wp-admin/js/widgets/custom-html-widgets.js

    r41957 r42403  
    22/* eslint consistent-this: [ "error", "control" ] */
    33/* eslint no-magic-numbers: ["error", { "ignore": [0,1,-1] }] */
     4
     5/**
     6 * @namespace wp.customHtmlWidget
     7 * @memberOf wp
     8 */
    49wp.customHtmlWidgets = ( function( $ ) {
    510    'use strict';
     
    1621    };
    1722
    18     /**
    19      * Text widget control.
    20      *
    21      * @class CustomHtmlWidgetControl
    22      * @constructor
    23      * @abstract
    24      */
    25     component.CustomHtmlWidgetControl = Backbone.View.extend({
     23    component.CustomHtmlWidgetControl = Backbone.View.extend(/** @lends wp.customHtmlWidgets.CustomHtmlWidgetControl.prototype */{
    2624
    2725        /**
     
    3331
    3432        /**
    35          * Initialize.
     33         * Text widget control.
     34         *
     35         * @constructs wp.customHtmlWidgets.CustomHtmlWidgetControl
     36         * @augments Backbone.View
     37         * @abstract
    3638         *
    3739         * @param {Object} options - Options.
    3840         * @param {jQuery} options.el - Control field container element.
    3941         * @param {jQuery} options.syncContainer - Container element where fields are synced for the server.
     42         *
    4043         * @returns {void}
    4144         */
     
    172175                 * Handle tabbing to the field before the editor.
    173176                 *
     177                 * @ignore
     178                 *
    174179                 * @returns {void}
    175180                 */
     
    180185                /**
    181186                 * Handle tabbing to the field after the editor.
     187                 *
     188                 * @ignore
    182189                 *
    183190                 * @returns {void}
     
    191198                 * Disable save button and store linting errors for use in updateFields.
    192199                 *
     200                 * @ignore
     201                 *
    193202                 * @param {Array} errorAnnotations - Error notifications.
    194203                 * @returns {void}
     
    200209                /**
    201210                 * Update error notice.
     211                 *
     212                 * @ignore
    202213                 *
    203214                 * @param {Array} errorAnnotations - Error annotations.
     
    260271     * Mapping of widget ID to instances of CustomHtmlWidgetControl subclasses.
    261272     *
     273     * @alias wp.customHtmlWidgets.widgetControls
     274     *
    262275     * @type {Object.<string, wp.textWidgets.CustomHtmlWidgetControl>}
    263276     */
     
    267280     * Handle widget being added or initialized for the first time at the widget-added event.
    268281     *
     282     * @alias wp.customHtmlWidgets.handleWidgetAdded
     283     *
    269284     * @param {jQuery.Event} event - Event.
    270285     * @param {jQuery}       widgetContainer - Widget container element.
     286     *
    271287     * @returns {void}
    272288     */
     
    326342     * Setup widget in accessibility mode.
    327343     *
     344     * @alias wp.customHtmlWidgets.setupAccessibleMode
     345     *
    328346     * @returns {void}
    329347     */
     
    358376     * the widgets admin screen and also via the 'widget-synced' event when making
    359377     * a change to a widget in the customizer.
     378     *
     379     * @alias wp.customHtmlWidgets.handleWidgetUpdated
    360380     *
    361381     * @param {jQuery.Event} event - Event.
     
    388408     * attached which calls wp.textWidgets.init().
    389409     *
     410     * @alias wp.customHtmlWidgets.init
     411     *
    390412     * @param {object} settings - Options for code editor, exported from PHP.
     413     *
    391414     * @returns {void}
    392415     */
  • trunk/src/wp-admin/js/widgets/media-audio-widget.js

    r40821 r42403  
    88     * Custom audio details frame that removes the replace-audio state.
    99     *
    10      * @class AudioDetailsMediaFrame
    11      * @constructor
     10     * @class    wp.mediaWidgets.controlConstructors~AudioDetailsMediaFrame
     11     * @augments wp.media.view.MediaFrame.AudioDetails
    1212     */
    13     AudioDetailsMediaFrame = wp.media.view.MediaFrame.AudioDetails.extend({
     13    AudioDetailsMediaFrame = wp.media.view.MediaFrame.AudioDetails.extend(/** @lends wp.mediaWidgets.controlConstructors~AudioDetailsMediaFrame.prototype */{
    1414
    1515        /**
     
    4141     * See WP_Widget_Audio::enqueue_admin_scripts() for amending prototype from PHP exports.
    4242     *
    43      * @class AudioWidgetModel
    44      * @constructor
     43     * @class    wp.mediaWidgets.modelConstructors.media_audio
     44     * @augments wp.mediaWidgets.MediaWidgetModel
    4545     */
    4646    AudioWidgetModel = component.MediaWidgetModel.extend({});
     
    5151     * See WP_Widget_Audio::enqueue_admin_scripts() for amending prototype from PHP exports.
    5252     *
    53      * @class AudioWidgetModel
    54      * @constructor
     53     * @class    wp.mediaWidgets.controlConstructors.media_audio
     54     * @augments wp.mediaWidgets.MediaWidgetControl
    5555     */
    56     AudioWidgetControl = component.MediaWidgetControl.extend({
     56    AudioWidgetControl = component.MediaWidgetControl.extend(/** @lends wp.mediaWidgets.controlConstructors.media_audio.prototype */{
    5757
    5858        /**
  • trunk/src/wp-admin/js/widgets/media-gallery-widget.js

    r41951 r42403  
    99     *
    1010     * @since 4.9.0
    11      * @class GalleryDetailsMediaFrame
    12      * @constructor
     11     * @class    wp.mediaWidgets~GalleryDetailsMediaFrame
     12     * @augments wp.media.view.MediaFrame.Post
    1313     */
    14     GalleryDetailsMediaFrame = wp.media.view.MediaFrame.Post.extend( {
     14    GalleryDetailsMediaFrame = wp.media.view.MediaFrame.Post.extend(/** @lends wp.mediaWidgets~GalleryDetailsMediaFrame.prototype */{
    1515
    1616        /**
     
    5454     *
    5555     * @since 4.9.0
    56      * @class GalleryWidgetModel
    57      * @constructor
     56     *
     57     * @class    wp.mediaWidgets.modelConstructors.media_gallery
     58     * @augments wp.mediaWidgets.MediaWidgetModel
    5859     */
    59     GalleryWidgetModel = component.MediaWidgetModel.extend( {} );
    60 
    61     /**
    62      * Gallery widget control.
    63      *
    64      * See WP_Widget_Gallery::enqueue_admin_scripts() for amending prototype from PHP exports.
    65      *
    66      * @since 4.9.0
    67      * @class GalleryWidgetControl
    68      * @constructor
    69      */
    70     GalleryWidgetControl = component.MediaWidgetControl.extend( {
     60    GalleryWidgetModel = component.MediaWidgetModel.extend(/** @lends wp.mediaWidgets.modelConstructors.media_gallery.prototype */{} );
     61
     62    GalleryWidgetControl = component.MediaWidgetControl.extend(/** @lends wp.mediaWidgets.controlConstructors.media_gallery.prototype */{
    7163
    7264        /**
     
    8173
    8274        /**
    83          * Initialize.
     75         * Gallery widget control.
     76         *
     77         * See WP_Widget_Gallery::enqueue_admin_scripts() for amending prototype from PHP exports.
     78         *
     79         * @constructs wp.mediaWidgets.controlConstructors.media_gallery
     80         * @augments   wp.mediaWidgets.MediaWidgetControl
    8481         *
    8582         * @since 4.9.0
  • trunk/src/wp-admin/js/widgets/media-image-widget.js

    r41590 r42403  
    1010     * See WP_Widget_Media_Image::enqueue_admin_scripts() for amending prototype from PHP exports.
    1111     *
    12      * @class ImageWidgetModel
    13      * @constructor
     12     * @class    wp.mediaWidgets.modelConstructors.media_image
     13     * @augments wp.mediaWidgets.MediaWidgetModel
    1414     */
    1515    ImageWidgetModel = component.MediaWidgetModel.extend({});
     
    2020     * See WP_Widget_Media_Image::enqueue_admin_scripts() for amending prototype from PHP exports.
    2121     *
    22      * @class ImageWidgetModel
    23      * @constructor
     22     * @class    wp.mediaWidgets.controlConstructors.media_audio
     23     * @augments wp.mediaWidgets.MediaWidgetControl
    2424     */
    25     ImageWidgetControl = component.MediaWidgetControl.extend({
     25    ImageWidgetControl = component.MediaWidgetControl.extend(/** @lends wp.mediaWidgets.controlConstructors.media_image.prototype */{
    2626
    2727        /**
  • trunk/src/wp-admin/js/widgets/media-video-widget.js

    r41933 r42403  
    88     * Custom video details frame that removes the replace-video state.
    99     *
    10      * @class VideoDetailsMediaFrame
    11      * @constructor
     10     * @class    wp.mediaWidgets.controlConstructors~VideoDetailsMediaFrame
     11     * @augments wp.media.view.MediaFrame.VideoDetails
     12     *
     13     * @private
    1214     */
    13     VideoDetailsMediaFrame = wp.media.view.MediaFrame.VideoDetails.extend({
     15    VideoDetailsMediaFrame = wp.media.view.MediaFrame.VideoDetails.extend(/** @lends wp.mediaWidgets.controlConstructors~VideoDetailsMediaFrame.prototype */{
    1416
    1517        /**
     
    5052     * See WP_Widget_Video::enqueue_admin_scripts() for amending prototype from PHP exports.
    5153     *
    52      * @class VideoWidgetModel
    53      * @constructor
     54     * @class    wp.mediaWidgets.modelConstructors.media_video
     55     * @augments wp.mediaWidgets.MediaWidgetModel
    5456     */
    5557    VideoWidgetModel = component.MediaWidgetModel.extend({});
     
    6062     * See WP_Widget_Video::enqueue_admin_scripts() for amending prototype from PHP exports.
    6163     *
    62      * @class VideoWidgetControl
    63      * @constructor
     64     * @class    wp.mediaWidgets.controlConstructors.media_video
     65     * @augments wp.mediaWidgets.MediaWidgetControl
    6466     */
    65     VideoWidgetControl = component.MediaWidgetControl.extend({
     67    VideoWidgetControl = component.MediaWidgetControl.extend(/** @lends wp.mediaWidgets.controlConstructors.media_video.prototype */{
    6668
    6769        /**
  • trunk/src/wp-admin/js/widgets/media-widgets.js

    r41947 r42403  
    11/* eslint consistent-this: [ "error", "control" ] */
     2
     3/**
     4 * @namespace wp.mediaWidgets
     5 * @memberOf  wp
     6 */
    27wp.mediaWidgets = ( function( $ ) {
    38    'use strict';
     
    914     *
    1015     * Media widgets register themselves by assigning subclasses of MediaWidgetControl onto this object by widget ID base.
     16     *
     17     * @memberOf wp.mediaWidgets
    1118     *
    1219     * @type {Object.<string, wp.mediaWidgets.MediaWidgetModel>}
     
    1926     * Media widgets register themselves by assigning subclasses of MediaWidgetControl onto this object by widget ID base.
    2027     *
     28     * @memberOf wp.mediaWidgets
     29     *
    2130     * @type {Object.<string, wp.mediaWidgets.MediaWidgetModel>}
    2231     */
    2332    component.modelConstructors = {};
    2433
    25     /**
    26      * Library which persists the customized display settings across selections.
    27      *
    28      * @class PersistentDisplaySettingsLibrary
    29      * @constructor
    30      */
    31     component.PersistentDisplaySettingsLibrary = wp.media.controller.Library.extend({
    32 
    33         /**
    34          * Initialize.
     34    component.PersistentDisplaySettingsLibrary = wp.media.controller.Library.extend(/** @lends wp.mediaWidgets.PersistentDisplaySettingsLibrary.prototype */{
     35
     36        /**
     37         * Library which persists the customized display settings across selections.
     38         *
     39         * @constructs wp.mediaWidgets.PersistentDisplaySettingsLibrary
     40         * @augments   wp.media.controller.Library
    3541         *
    3642         * @param {Object} options - Options.
     43         *
    3744         * @returns {void}
    3845         */
     
    8087     * Extended view for managing the embed UI.
    8188     *
    82      * @class MediaEmbedView
    83      * @constructor
     89     * @class    wp.mediaWidgets.MediaEmbedView
     90     * @augments wp.media.view.Embed
    8491     */
    85     component.MediaEmbedView = wp.media.view.Embed.extend({
     92    component.MediaEmbedView = wp.media.view.Embed.extend(/** @lends wp.mediaWidgets.MediaEmbedView.prototype */{
    8693
    8794        /**
     
    110117         */
    111118        refresh: function refresh() {
     119            /**
     120             * @class wp.mediaWidgets~Constructor
     121             */
    112122            var Constructor;
    113123
     
    117127
    118128                // This should be eliminated once #40450 lands of when this is merged into core.
    119                 Constructor = wp.media.view.EmbedLink.extend({
     129                Constructor = wp.media.view.EmbedLink.extend(/** @lends wp.mediaWidgets~Constructor.prototype */{
    120130
    121131                    /**
     
    285295     * Custom media frame for selecting uploaded media or providing media by URL.
    286296     *
    287      * @class MediaFrameSelect
    288      * @constructor
     297     * @class    wp.mediaWidgets.MediaFrameSelect
     298     * @augments wp.media.view.MediaFrame.Post
    289299     */
    290     component.MediaFrameSelect = wp.media.view.MediaFrame.Post.extend({
     300    component.MediaFrameSelect = wp.media.view.MediaFrame.Post.extend(/** @lends wp.mediaWidgets.MediaFrameSelect.prototype */{
    291301
    292302        /**
     
    358368                 * Handle click.
    359369                 *
     370                 * @ignore
     371                 *
    360372                 * @fires wp.media.controller.State#insert()
    361373                 * @returns {void}
     
    409421    });
    410422
    411     /**
    412      * Media widget control.
    413      *
    414      * @class MediaWidgetControl
    415      * @constructor
    416      * @abstract
    417      */
    418     component.MediaWidgetControl = Backbone.View.extend({
     423    component.MediaWidgetControl = Backbone.View.extend(/** @lends wp.mediaWidgets.MediaWidgetControl.prototype */{
    419424
    420425        /**
     
    474479
    475480        /**
    476          * Initialize.
     481         * Media Widget Control.
     482         *
     483         * @constructs wp.mediaWidgets.MediaWidgetControl
     484         * @augments   Backbone.View
     485         * @abstract
    477486         *
    478487         * @param {Object}         options - Options.
     
    480489         * @param {jQuery}         options.el - Control field container element.
    481490         * @param {jQuery}         options.syncContainer - Container element where fields are synced for the server.
     491         *
    482492         * @returns {void}
    483493         */
     
    962972     * Media widget model.
    963973     *
    964      * @class MediaWidgetModel
    965      * @constructor
     974     * @class    wp.mediaWidgets.MediaWidgetModel
     975     * @augments Backbone.Model
    966976     */
    967     component.MediaWidgetModel = Backbone.Model.extend({
     977    component.MediaWidgetModel = Backbone.Model.extend(/** @lends wp.mediaWidgets.MediaWidgetModel.prototype */{
    968978
    969979        /**
     
    10861096     * Collection of all widget model instances.
    10871097     *
     1098     * @memberOf wp.mediaWidgets
     1099     *
    10881100     * @type {Backbone.Collection}
    10891101     */
    1090     component.modelCollection = new ( Backbone.Collection.extend({
     1102    component.modelCollection = new ( Backbone.Collection.extend( {
    10911103        model: component.MediaWidgetModel
    10921104    }) )();
     
    10941106    /**
    10951107     * Mapping of widget ID to instances of MediaWidgetControl subclasses.
     1108     *
     1109     * @memberOf wp.mediaWidgets
    10961110     *
    10971111     * @type {Object.<string, wp.mediaWidgets.MediaWidgetControl>}
     
    11021116     * Handle widget being added or initialized for the first time at the widget-added event.
    11031117     *
     1118     * @memberOf wp.mediaWidgets
     1119     *
    11041120     * @param {jQuery.Event} event - Event.
    11051121     * @param {jQuery}       widgetContainer - Widget container element.
     1122     *
    11061123     * @returns {void}
    11071124     */
     
    11851202     * Setup widget in accessibility mode.
    11861203     *
     1204     * @memberOf wp.mediaWidgets
     1205     *
    11871206     * @returns {void}
    11881207     */
     
    12341253     * a change to a widget in the customizer.
    12351254     *
     1255     * @memberOf wp.mediaWidgets
     1256     *
    12361257     * @param {jQuery.Event} event - Event.
    12371258     * @param {jQuery}       widgetContainer - Widget container element.
     1259     *
    12381260     * @returns {void}
    12391261     */
     
    12671289     * When WordPress enqueues this script, it should have an inline script
    12681290     * attached which calls wp.mediaWidgets.init().
     1291     *
     1292     * @memberOf wp.mediaWidgets
    12691293     *
    12701294     * @returns {void}
  • trunk/src/wp-admin/js/widgets/text-widgets.js

    r41354 r42403  
    11/* global tinymce, switchEditors */
    22/* eslint consistent-this: [ "error", "control" ] */
     3
     4/**
     5 * @namespace wp.textWidgets
     6 */
    37wp.textWidgets = ( function( $ ) {
    48    'use strict';
     
    913    };
    1014
    11     /**
    12      * Text widget control.
    13      *
    14      * @class TextWidgetControl
    15      * @constructor
    16      * @abstract
    17      */
    18     component.TextWidgetControl = Backbone.View.extend({
     15    component.TextWidgetControl = Backbone.View.extend(/** @lends wp.textWidgets.TextWidgetControl.prototype */{
    1916
    2017        /**
     
    2623
    2724        /**
    28          * Initialize.
     25         * Text widget control.
     26         *
     27         * @constructs wp.textWidgets.TextWidgetControl
     28         * @augments   Backbone.View
     29         * @abstract
    2930         *
    3031         * @param {Object} options - Options.
    3132         * @param {jQuery} options.el - Control field container element.
    3233         * @param {jQuery} options.syncContainer - Container element where fields are synced for the server.
     34         *
    3335         * @returns {void}
    3436         */
     
    358360     * Mapping of widget ID to instances of TextWidgetControl subclasses.
    359361     *
     362     * @memberOf wp.textWidgets
     363     *
    360364     * @type {Object.<string, wp.textWidgets.TextWidgetControl>}
    361365     */
     
    365369     * Handle widget being added or initialized for the first time at the widget-added event.
    366370     *
     371     * @memberOf wp.textWidgets
     372     *
    367373     * @param {jQuery.Event} event - Event.
    368374     * @param {jQuery}       widgetContainer - Widget container element.
     375     *
    369376     * @returns {void}
    370377     */
     
    430437     * Setup widget in accessibility mode.
    431438     *
     439     * @memberOf wp.textWidgets
     440     *
    432441     * @returns {void}
    433442     */
     
    467476     * the widgets admin screen and also via the 'widget-synced' event when making
    468477     * a change to a widget in the customizer.
     478     *
     479     * @memberOf wp.textWidgets
    469480     *
    470481     * @param {jQuery.Event} event - Event.
     
    496507     * When WordPress enqueues this script, it should have an inline script
    497508     * attached which calls wp.textWidgets.init().
     509     *
     510     * @memberOf wp.textWidgets
    498511     *
    499512     * @returns {void}
  • trunk/src/wp-includes/js/comment-reply.js

    r42360 r42403  
    33 *
    44 * @since 2.7.0
     5 *
     6 * @namespace addComment
    57 *
    68 * @type {Object}
     
    5153     * @since 5.0.0
    5254     *
     55     * @memberOf addComment
     56     *
    5357     * @param {HTMLElement} context The parent DOM element to search for links.
    5458     */
     
    199203     *
    200204     * @since 2.7.0
     205     *
     206     * @memberOf addComment
    201207     *
    202208     * @param {String} addBelowId HTML ID of element the form follows.
  • trunk/src/wp-includes/js/customize-base.js

    r41803 r42403  
    909909     * Get all customize settings.
    910910     *
    911      * @memberOf wp.customize
     911     * @alias wp.customize.get
    912912     *
    913913     * @return {object}
     
    935935     * @since 4.7.0
    936936     * @access public
    937      * @memberOf wp.customize.utils
     937     *
     938     * @alias wp.customize.utils.parseQueryString
    938939     *
    939940     * @param {string} queryString Query string.
  • trunk/src/wp-includes/js/media/views/frame/post.js

    r41351 r42403  
    446446
    447447            /**
    448              * @callback
     448             * @ignore
     449             *
    449450             * @fires wp.media.controller.State#insert
    450451             */
  • trunk/src/wp-includes/js/mediaelement/wp-mediaelement.js

    r41877 r42403  
    1212         * Ensures media elements that have already been initialized won't be
    1313         * processed again.
     14         *
     15         * @memberOf wp.mediaelement
    1416         *
    1517         * @since 4.4.0
     
    5759    }
    5860
     61    /**
     62     * @namespace wp.mediaelement
     63     * @memberOf wp
     64     */
    5965    window.wp.mediaelement = new wpMediaElement();
    6066
  • trunk/src/wp-includes/js/mediaelement/wp-playlist.js

    r36783 r42403  
    44    'use strict';
    55
    6     var WPPlaylistView = Backbone.View.extend({
     6    var WPPlaylistView = Backbone.View.extend(/** @lends WPPlaylistView.prototype */{
     7        /**
     8         * @constructs
     9         *
     10         * @param {Object} options          The options to create this playlist view with.
     11         * @param {Object} options.metadata The metadata
     12         */
    713        initialize : function (options) {
    814            this.index = 0;
     
    6066            }
    6167
    62             /**
    63              * This is also our bridge to the outside world
    64              */
     68            // This is also our bridge to the outside world.
    6569            this.player = new MediaElementPlayer( this.playerNode.get(0), this.settings );
    6670        },
  • trunk/src/wp-includes/js/plupload/wp-plupload.js

    r41351 r42403  
    11/* global pluploadL10n, plupload, _wpPluploadSettings */
    22
     3/**
     4 * @namespace wp
     5 */
    36window.wp = window.wp || {};
    47
     
    1619     * This object bridges the Plupload API to integrate uploads into the
    1720     * WordPress back end and the WordPress media experience.
     21     *
     22     * @class
     23     * @memberOf wp
     24     * @alias wp.Uploader
    1825     *
    1926     * @param {object} options           The options passed to the new plupload instance.
  • trunk/src/wp-includes/js/wp-api.js

    r42047 r42403  
    11621162                     * on the schema model data.
    11631163                     *
    1164                      * @callback
     1164                     * @ignore
    11651165                     */
    11661166                    success: function( newSchemaModel ) {
Note: See TracChangeset for help on using the changeset viewer.