WordPress.org

Make WordPress Core

Changeset 48650


Ignore:
Timestamp:
07/27/2020 11:33:51 PM (14 months ago)
Author:
whyisjake
Message:

Build/Test Tools: Enable JSDocs to be linted with ESLint.

As part of the [Javascript Inline Docs Initiative](https://make.wordpress.org/core/handbook/docs/inline/js/) this add some tooling to lint Javascript docblocks. Two new commands:

  • npm run lint:jsdoc
  • npm run lint:jsdoc:fix

The latter will run the linter and try to fix an possible issues automatically.

Fixes #43828.
Props netweb, atimmer, kamataryo, whyisjake.

Location:
trunk
Files:
2 added
44 edited

Legend:

Unmodified
Added
Removed
  • trunk/package.json

    r48644 r48650  
    156156        "watch": "grunt watch",
    157157        "grunt": "grunt",
     158        "lint:jsdoc": "wp-scripts lint-js",
     159        "lint:jsdoc:fix": "wp-scripts lint-js --fix",
    158160        "env:start": "node ./tools/local-env/scripts/start.js",
    159161        "env:stop": "node ./tools/local-env/scripts/docker.js down",
  • trunk/src/js/_enqueues/admin/common.js

    r48427 r48650  
    138138     * @since 3.1.0
    139139     *
    140      * @param {int} diff The modifier for the column span.
     140     * @param {number} diff The modifier for the column span.
    141141     */
    142142    colSpanChange : function(diff) {
     
    385385 * it will be disabled.
    386386 *
    387  * @param {object} button Button jQuery object.
     387 * @param {Object} button Button jQuery object.
    388388 */
    389389function changeStructureTagButtonState( button ) {
  • trunk/src/js/_enqueues/admin/edit-comments.js

    r48351 r48650  
    160160     * @since 5.2.0
    161161     *
    162      * @param {object} response Ajax response from the server that includes a
     162     * @param {Object} response Ajax response from the server that includes a
    163163     *                          translated "comments in moderation" message.
    164164     *
  • trunk/src/js/_enqueues/admin/inline-edit-post.js

    r48391 r48650  
    390390     * @since 2.7.0
    391391     *
    392      * @param {int} id The ID for the post that has been changed.
     392     * @param {number} id The ID for the post that has been changed.
    393393     * @return {boolean} False, so the form does not submit when pressing
    394394     *                   Enter on a focused field.
  • trunk/src/js/_enqueues/admin/post.js

    r48396 r48650  
    3535         * @memberof commentsBox
    3636         *
    37          * @param {int} total Total number of comments for this post.
    38          * @param {int} num   Optional. Number of comments to fetch, defaults to 20.
     37         * @param {number} total Total number of comments for this post.
     38         * @param {number} num   Optional. Number of comments to fetch, defaults to 20.
    3939         * @return {boolean} Always returns false.
    4040         */
     
    9595         * @memberof commentsBox
    9696         *
    97          * @param {int} total Total number of comments to load.
     97         * @param {number} total Total number of comments to load.
    9898         */
    9999        load: function(total){
     
    117117     * Set the Image ID of the Featured Image
    118118     *
    119      * @param {int} id The post_id of the image to use as Featured Image.
     119     * @param {number} id The post_id of the image to use as Featured Image.
    120120     *
    121121     * @global
  • trunk/src/js/_enqueues/admin/postbox.js

    r48460 r48650  
    155155         *
    156156         * @param {string} position The "previous" or "next" sortables area.
    157          * @param {object} button   The jQuery object representing the button that was clicked.
    158          * @param {object} postbox  The jQuery object representing the postbox to be moved.
     157         * @param {Object} button   The jQuery object representing the button that was clicked.
     158         * @param {Object} postbox  The jQuery object representing the postbox to be moved.
    159159         *
    160160         * @return {void}
  • trunk/src/js/_enqueues/admin/tags-suggest.js

    r48350 r48650  
    3131     * @since 4.7.0
    3232     *
    33      * @param {object} options Options that are passed to UI Autocomplete. Can be used to override the default settings.
    34      * @return {object} jQuery instance.
     33     * @param {Object} options Options that are passed to UI Autocomplete. Can be used to override the default settings.
     34     * @return {Object} jQuery instance.
    3535     */
    3636    $.fn.wpTagsSuggest = function( options ) {
  • trunk/src/js/_enqueues/admin/widgets.js

    r48387 r48650  
    235235             * @ignore
    236236             *
    237              * @param {object} event jQuery event object.
     237             * @param {Object} event jQuery event object.
    238238             */
    239239            over: function( event ) {
     
    260260             * @ignore
    261261             *
    262              * @param {object} event jQuery event object.
     262             * @param {Object} event jQuery event object.
    263263             */
    264264            out: function( event ) {
     
    730730     * Used when a Widget gets dragged in/out of the Sidebar and never dropped.
    731731     *
    732      * @param {object} event jQuery event object.
     732     * @param {Object} event jQuery event object.
    733733     */
    734734    closeSidebar: function( event ) {
  • trunk/src/js/_enqueues/lib/admin-bar.js

    r47771 r48650  
    295295     *
    296296     * @param {HTMLElement} element The HTML element.
    297      * @param {String}      className The class name.
    298      * @return {bool} Whether the element has the className.
     297     * @param {string}      className The class name.
     298     * @return {boolean} Whether the element has the className.
    299299     */
    300300    function hasClass( element, className ) {
     
    321321     *
    322322     * @param {HTMLElement} element The HTML element.
    323      * @param {String}      className The class name.
     323     * @param {string}      className The class name.
    324324     */
    325325    function addClass( element, className ) {
     
    345345     *
    346346     * @param {HTMLElement} element The HTML element.
    347      * @param {String}      className The class name.
     347     * @param {string}      className The class name.
    348348     */
    349349    function removeClass( element, className ) {
  • trunk/src/js/_enqueues/lib/comment-reply.js

    r47506 r48650  
    266266     *
    267267     * @param {HTMLElement} Element DOM element with the attribute.
    268      * @param {String}      Attribute the attribute to get.
    269      *
    270      * @return {String}
     268     * @param {string}      Attribute the attribute to get.
     269     *
     270     * @return {string}
    271271     */
    272272    function getDataAttribute( element, attribute ) {
     
    299299     * @memberOf addComment
    300300     *
    301      * @param {String} addBelowId HTML ID of element the form follows.
    302      * @param {String} commentId  Database ID of comment being replied to.
    303      * @param {String} respondId  HTML ID of 'respond' element.
    304      * @param {String} postId     Database ID of the post.
    305      * @param {String} replyTo    Form heading content.
     301     * @param {string} addBelowId HTML ID of element the form follows.
     302     * @param {string} commentId  Database ID of comment being replied to.
     303     * @param {string} respondId  HTML ID of 'respond' element.
     304     * @param {string} postId     Database ID of the post.
     305     * @param {string} replyTo    Form heading content.
    306306     */
    307307    function moveForm( addBelowId, commentId, respondId, postId, replyTo ) {
  • trunk/src/js/_enqueues/lib/image-edit.js

    r48375 r48650  
    7474     *
    7575     * @param {jQuery}         el The element that should be modified.
    76      * @param {bool|number}    s  The state for the element. If set to true
     76     * @param {boolean|number}    s  The state for the element. If set to true
    7777     *                            the element is disabled,
    7878     *                            otherwise the element is enabled.
     
    578578     * @param {number} postid   The post ID for the image.
    579579     * @param {string} nonce    The nonce to verify the request.
    580      * @param {object} view     The image editor view to be used for the editing.
     580     * @param {Object} view     The image editor view to be used for the editing.
    581581     *
    582582     * @return {void|promise} Either returns void if the button was already activated
     
    775775             * @ignore
    776776             *
    777              * @param {object} img jQuery object representing the image.
    778              * @param {object} c   The selection.
     777             * @param {Object} img jQuery object representing the image.
     778             * @param {Object} c   The selection.
    779779             *
    780              * @return {object}
     780             * @return {Object}
    781781             */
    782782            onSelectEnd: function(img, c) {
     
    789789             * @ignore
    790790             *
    791              * @param {object} img jQuery object representing the image.
    792              * @param {object} c   The selection.
     791             * @param {Object} img jQuery object representing the image.
     792             * @param {Object} c   The selection.
    793793             *
    794794             * @return {void}
     
    810810     *
    811811     * @param {number} postid The post ID.
    812      * @param {object} c      The selection.
     812     * @param {Object} c      The selection.
    813813     *
    814814     * @return {boolean}
     
    842842     *
    843843     * @param {number}  postid The post ID.
    844      * @param {bool}    warn   Warning message.
    845      *
    846      * @return {void|bool} Returns false if there is a warning.
     844     * @param {boolean}    warn   Warning message.
     845     *
     846     * @return {void|boolean} Returns false if there is a warning.
    847847     */
    848848    close : function(postid, warn) {
     
    909909     * @memberof imageEdit
    910910     *
    911      * @param {object} op     The original position.
     911     * @param {Object} op     The original position.
    912912     * @param {number} postid The post ID.
    913913     * @param {string} nonce  The nonce.
     
    946946     * @param {number} postid The post ID.
    947947     * @param {string} nonce  The nonce.
    948      * @param {object} t      The target element.
     948     * @param {Object} t      The target element.
    949949     *
    950950     * @return {boolean}
     
    968968     * @param {number} postid The post ID.
    969969     * @param {string} nonce  The nonce.
    970      * @param {object} t      The target element.
     970     * @param {Object} t      The target element.
    971971     *
    972972     * @return {boolean}
     
    989989     * @param {number} postid The post ID.
    990990     * @param {string} nonce  The nonce.
    991      * @param {object} t      The target object.
     991     * @param {Object} t      The target object.
    992992     *
    993993     * @return {void|boolean} Returns false if the crop button is disabled.
  • trunk/src/js/_enqueues/lib/lists.js

    r48168 r48650  
    203203     *
    204204     * @param {jQuery} element  Element that triggered the request.
    205      * @param {object} settings Settings for the Ajax request.
     205     * @param {Object} settings Settings for the Ajax request.
    206206     * @return {string|number} Nonce
    207207     */
     
    259259     *
    260260     * @param {HTMLElement} list     The DOM element.
    261      * @param {object}      settings Settings for this list.
     261     * @param {Object}      settings Settings for this list.
    262262     * @param {string}      action   The type of action to perform: 'add', 'delete', or 'dim'.
    263      * @return {object|boolean} Settings if confirmed, false if not.
     263     * @return {Object|boolean} Settings if confirmed, false if not.
    264264     */
    265265    pre: function( list, settings, action ) {
     
    298298     *
    299299     * @param {HTMLElement} element  The DOM element.
    300      * @param {object}      settings Settings for this list.
     300     * @param {Object}      settings Settings for this list.
    301301     * @return {boolean} Whether the item was added.
    302302     */
     
    400400     *
    401401     * @param {HTMLElement} element  A DOM element containing item data.
    402      * @param {object}      settings Settings for this list.
     402     * @param {Object}      settings Settings for this list.
    403403     * @return {boolean} Whether the item was deleted.
    404404     */
     
    487487     *
    488488     * @param {HTMLElement} element  A DOM element containing item data.
    489      * @param {object}      settings Settings for this list.
     489     * @param {Object}      settings Settings for this list.
    490490     * @return {boolean} Whether the item was dim'ed.
    491491     */
     
    622622     *
    623623     * @param {HTMLElement} element  A DOM element containing item data.
    624      * @param {object}      settings Settings for this list.
     624     * @param {Object}      settings Settings for this list.
    625625     * @return {boolean} Whether the item was added.
    626626     */
  • trunk/src/js/_enqueues/lib/nav-menu.js

    r48394 r48650  
    430430         * Shows or hides buttons based on the location of the menu item.
    431431         *
    432          * @param {object} itemToRefresh The menu item that might need its advanced accessibility buttons refreshed
     432         * @param {Object} itemToRefresh The menu item that might need its advanced accessibility buttons refreshed
    433433         */
    434434        refreshAdvancedAccessibilityOfItem : function( itemToRefresh ) {
     
    12941294         * Remove a menu item.
    12951295         *
    1296          * @param {object} el The element to be removed as a jQuery object.
     1296         * @param {Object} el The element to be removed as a jQuery object.
    12971297         *
    12981298         * @fires document#menu-removing-item Passes the element to be removed.
  • trunk/src/js/_enqueues/wp/a11y.js

    r46800 r48650  
    1919     * @since 4.3.0 Introduced the 'ariaLive' argument.
    2020     *
    21      * @param {String} message    The message to be announced by Assistive Technologies.
    22      * @param {String} [ariaLive] The politeness level for aria-live. Possible values:
     21     * @param {string} message    The message to be announced by Assistive Technologies.
     22     * @param {string} [ariaLive] The politeness level for aria-live. Possible values:
    2323     *                            polite or assertive. Default polite.
    2424     * @return {void}
     
    5454     * @since 4.3.0
    5555     *
    56      * @param {String} ariaLive Optional. Value for the 'aria-live' attribute, default 'polite'.
     56     * @param {string} ariaLive Optional. Value for the 'aria-live' attribute, default 'polite'.
    5757     *
    5858     * @return {Object} $container The ARIA live region jQuery object.
  • trunk/src/js/_enqueues/wp/api.js

    r48110 r48650  
    187187     *
    188188     * @param {string}   route          The endpoint route.
    189      * @param {int}      part           The number of parts from the end of the route to retrieve. Default 1.
     189     * @param {number}      part           The number of parts from the end of the route to retrieve. Default 1.
    190190     *                                  Example route `/a/b/c`: part 1 is `c`, part 2 is `b`, part 3 is `a`.
    191191     * @param {string}  [versionString] Version string, defaults to `wp.api.versionString`.
     
    235235     * Add args and options to a model prototype from a route's endpoints.
    236236     *
    237      * @param {array}  routeEndpoints Array of route endpoints.
     237     * @param {Array}  routeEndpoints Array of route endpoints.
    238238     * @param {Object} modelInstance  An instance of the model (or collection)
    239239     *                                to add the args to.
     
    362362             *
    363363             * @param {string} parentModel      The parent model.
    364              * @param {int}    modelId          The model ID if the object to request
     364             * @param {number}    modelId          The model ID if the object to request
    365365             * @param {string} modelName        The model name to use when constructing the model.
    366366             * @param {string} embedSourcePoint Where to check the embedds object for _embed data.
     
    514514                 * @param {string} key The meta key.
    515515                 *
    516                  * @return {object} The post meta value.
     516                 * @return {Object} The post meta value.
    517517                 */
    518518                getMeta: function( key ) {
     
    524524                 * Get all meta key/values for a post.
    525525                 *
    526                  * @return {object} The post metas, as a key value pair object.
     526                 * @return {Object} The post metas, as a key value pair object.
    527527                 */
    528528                getMetas: function() {
     
    533533                 * Set a group of meta key/values for a post.
    534534                 *
    535                  * @param {object} meta The post meta to set, as key/value pairs.
     535                 * @param {Object} meta The post meta to set, as key/value pairs.
    536536                 */
    537537                setMetas: function( meta ) {
     
    545545                 *
    546546                 * @param {string} key   The meta key.
    547                  * @param {object} value The meta value.
     547                 * @param {Object} value The meta value.
    548548                 */
    549549                setMeta: function( key, value ) {
     
    590590                 * Accepts an array of tag slugs, or a Tags collection.
    591591                 *
    592                  * @param {array|Backbone.Collection} tags The tags to set on the post.
     592                 * @param {Array|Backbone.Collection} tags The tags to set on the post.
    593593                 *
    594594                 */
     
    636636                 * Accepts a Tags collection.
    637637                 *
    638                  * @param {array|Backbone.Collection} tags The tags to set on the post.
     638                 * @param {Array|Backbone.Collection} tags The tags to set on the post.
    639639                 *
    640640                 */
     
    674674                 * Accepts an array of category slugs, or a Categories collection.
    675675                 *
    676                  * @param {array|Backbone.Collection} categories The categories to set on the post.
     676                 * @param {Array|Backbone.Collection} categories The categories to set on the post.
    677677                 *
    678678                 */
     
    721721                 * Accepts Categories collection.
    722722                 *
    723                  * @param {array|Backbone.Collection} categories The categories to set on the post.
     723                 * @param {Array|Backbone.Collection} categories The categories to set on the post.
    724724                 *
    725725                 */
     
    14961496     * Initialize the wp-api, optionally passing the API root.
    14971497     *
    1498      * @param {object} [args]
     1498     * @param {Object} [args]
    14991499     * @param {string} [args.nonce] The nonce. Optional, defaults to wpApiSettings.nonce.
    15001500     * @param {string} [args.apiRoot] The api root. Optional, defaults to wpApiSettings.root.
    15011501     * @param {string} [args.versionString] The version string. Optional, defaults to wpApiSettings.root.
    1502      * @param {object} [args.schema] The schema. Optional, will be fetched from API if not provided.
     1502     * @param {Object} [args.schema] The schema. Optional, will be fetched from API if not provided.
    15031503     */
    15041504    wp.api.init = function( args ) {
  • trunk/src/js/_enqueues/wp/code-editor.js

    r47122 r48650  
    4040     *
    4141     * @param {CodeMirror} editor - Editor.
    42      * @param {object}     settings - Code editor settings.
    43      * @param {object}     settings.codeMirror - Settings for CodeMirror.
     42     * @param {Object}     settings - Code editor settings.
     43     * @param {Object}     settings.codeMirror - Settings for CodeMirror.
    4444     * @param {Function}   settings.onChangeLintingErrors - Callback for when there are changes to linting errors.
    4545     * @param {Function}   settings.onUpdateErrorNotice - Callback to update error notice.
     
    6565         * Get lint options.
    6666         *
    67          * @return {object} Lint options.
     67         * @return {Object} Lint options.
    6868         */
    6969        function getLintOptions() { // eslint-disable-line complexity
     
    214214     *
    215215     * @param {CodeMirror} codemirror - Editor.
    216      * @param {object}     settings - Code editor settings.
    217      * @param {object}     settings.codeMirror - Settings for CodeMirror.
     216     * @param {Object}     settings - Code editor settings.
     217     * @param {Object}     settings.codeMirror - Settings for CodeMirror.
    218218     * @param {Function}   settings.onTabNext - Callback to handle tabbing to the next tabbable element.
    219219     * @param {Function}   settings.onTabPrevious - Callback to handle tabbing to the previous tabbable element.
     
    268268     *
    269269     * @param {string|jQuery|Element} textarea - The HTML id, jQuery object, or DOM Element for the textarea that is used for the editor.
    270      * @param {object}                [settings] - Settings to override defaults.
     270     * @param {Object}                [settings] - Settings to override defaults.
    271271     * @param {Function}              [settings.onChangeLintingErrors] - Callback for when the linting errors have changed.
    272272     * @param {Function}              [settings.onUpdateErrorNotice] - Callback for when error notice should be displayed.
    273273     * @param {Function}              [settings.onTabPrevious] - Callback to handle tabbing to the previous tabbable element.
    274274     * @param {Function}              [settings.onTabNext] - Callback to handle tabbing to the next tabbable element.
    275      * @param {object}                [settings.codemirror] - Options for CodeMirror.
    276      * @param {object}                [settings.csslint] - Rules for CSSLint.
    277      * @param {object}                [settings.htmlhint] - Rules for HTMLHint.
    278      * @param {object}                [settings.jshint] - Rules for JSHint.
     275     * @param {Object}                [settings.codemirror] - Options for CodeMirror.
     276     * @param {Object}                [settings.csslint] - Rules for CSSLint.
     277     * @param {Object}                [settings.htmlhint] - Rules for HTMLHint.
     278     * @param {Object}                [settings.jshint] - Rules for JSHint.
    279279     *
    280280     * @return {CodeEditorInstance} Instance.
  • trunk/src/js/_enqueues/wp/custom-header.js

    r47122 r48650  
    109109         * Initialize the video handler.
    110110         *
    111          * @param {object} settings Video settings.
     111         * @param {Object} settings Video settings.
    112112         */
    113113        initialize: function( settings ) {
     
    218218         *
    219219         * @abstract
    220          * @param {object} settings Video settings.
     220         * @param {Object} settings Video settings.
    221221         * @return {boolean}
    222222         */
     
    240240     * @memberOf wp
    241241     *
    242      * @param {object} protoProps Properties to apply to the prototype.
     242     * @param {Object} protoProps Properties to apply to the prototype.
    243243     * @return CustomHandler The subclass.
    244244     */
     
    272272         * Whether the native handler supports a video.
    273273         *
    274          * @param {object} settings Video settings.
     274         * @param {Object} settings Video settings.
    275275         * @return {boolean}
    276276         */
     
    346346         * Whether the handler supports a video.
    347347         *
    348          * @param {object} settings Video settings.
     348         * @param {Object} settings Video settings.
    349349         * @return {boolean}
    350350         */
  • trunk/src/js/_enqueues/wp/customize/base.js

    r48110 r48650  
    189189        /**
    190190         * @param {mixed}  initial The initial value.
    191          * @param {object} options
     191         * @param {Object} options
    192192         */
    193193        initialize: function( initial, options ) {
     
    221221         * Set the value and trigger all bound callbacks.
    222222         *
    223          * @param {object} to New value.
     223         * @param {Object} to New value.
    224224         */
    225225        set: function( to ) {
     
    383383         *
    384384         * @param {string} id The ID of the item to look for.
    385          * @return {Boolean}
     385         * @return {boolean}
    386386         */
    387387        has: function( id ) {
     
    448448         *
    449449         * @param {Function} callback Function to invoke.
    450          * @param {object}   context  Object context to invoke the function with. Optional.
     450         * @param {Object}   context  Object context to invoke the function with. Optional.
    451451         */
    452452        each: function( callback, context ) {
     
    683683         * Initialize Messenger.
    684684         *
    685          * @param {object} params  - Parameters to configure the messenger.
     685         * @param {Object} params  - Parameters to configure the messenger.
    686686         *        {string} params.url          - The URL to communicate with.
    687687         *        {window} params.targetWindow - The window instance to communicate with. Default window.parent.
    688688         *        {string} params.channel      - If provided, will send the channel with each message and only accept messages a matching channel.
    689          * @param {object} options - Extend any instance parameter or method with this object.
     689         * @param {Object} options - Extend any instance parameter or method with this object.
    690690         */
    691691        initialize: function( params, options ) {
     
    788788         *
    789789         * @param {string} id   The event name.
    790          * @param {object} data Data.
     790         * @param {Object} data Data.
    791791         */
    792792        send: function( id, data ) {
     
    863863         *
    864864         * @param {string}   code - Notification code.
    865          * @param {object}   params - Notification parameters.
     865         * @param {Object}   params - Notification parameters.
    866866         * @param {string}   params.message - Message.
    867867         * @param {string}   [params.type=error] - Type.
     
    935935     * @alias wp.customize.get
    936936     *
    937      * @return {object}
     937     * @return {Object}
    938938     */
    939939    api.get = function() {
     
    963963     *
    964964     * @param {string} queryString Query string.
    965      * @return {object} Parsed query string.
     965     * @return {Object} Parsed query string.
    966966     */
    967967    api.utils.parseQueryString = function parseQueryString( queryString ) {
  • trunk/src/js/_enqueues/wp/customize/controls.js

    r48210 r48650  
    2626         *
    2727         * @param {string} code - Code.
    28          * @param {object} params - Params.
     28         * @param {Object} params - Params.
    2929         */
    3030        initialize: function( code, params ) {
     
    9595         * @augments   wp.customize.Values
    9696         *
    97          * @param {object}  options - Options.
     97         * @param {Object}  options - Options.
    9898         * @param {jQuery}  [options.container] - Container element for notifications. This can be injected later.
    9999         * @param {boolean} [options.alt] - Whether alternative style should be used when rendering notifications.
     
    175175         *
    176176         * @since 4.9.0
    177          * @param {object}  args - Args.
     177         * @param {Object}  args - Args.
    178178         * @param {boolean} [args.sort=false] - Whether to return the notifications sorted.
    179179         * @return {Array.<wp.customize.Notification>} Notifications.
     
    363363         * @param {string}  id                          - The setting ID.
    364364         * @param {*}       value                       - The initial value of the setting.
    365          * @param {object}  [options={}]                - Options.
     365         * @param {Object}  [options={}]                - Options.
    366366         * @param {string}  [options.transport=refresh] - The transport to use for previewing. Supports 'refresh' and 'postMessage'.
    367367         * @param {boolean} [options.dirty=false]       - Whether the setting should be considered initially dirty.
    368          * @param {object}  [options.previewer]         - The Previewer instance to sync with. Defaults to wp.customize.previewer.
     368         * @param {Object}  [options.previewer]         - The Previewer instance to sync with. Defaults to wp.customize.previewer.
    369369         */
    370370        initialize: function( id, value, options ) {
     
    496496     * @access public
    497497     *
    498      * @param {object} [options] Options.
     498     * @param {Object} [options] Options.
    499499     * @param {boolean} [options.unsaved=false] Whether only values not saved yet into a changeset will be returned (differential changes).
    500      * @return {object} Dirty setting values.
     500     * @return {Object} Dirty setting values.
    501501     */
    502502    api.dirtyValues = function dirtyValues( options ) {
     
    529529     * @access public
    530530     *
    531      * @param {object}  [changes] - Mapping of setting IDs to setting params each normally including a value property, or mapping to null.
     531     * @param {Object}  [changes] - Mapping of setting IDs to setting params each normally including a value property, or mapping to null.
    532532     *                             If not provided, then the changes will still be obtained from unsaved dirty settings.
    533      * @param {object}  [args] - Additional options for the save request.
     533     * @param {Object}  [args] - Additional options for the save request.
    534534     * @param {boolean} [args.autosave=false] - Whether changes will be stored in autosave revision if the changeset has been promoted from an auto-draft.
    535535     * @param {boolean} [args.force=false] - Send request to update even when there are no changes to submit. This can be used to request the latest status of the changeset on the server.
     
    737737     * @param {(wp.customize.Panel|wp.customize.Section|wp.customize.Control)} a
    738738     * @param {(wp.customize.Panel|wp.customize.Section|wp.customize.Control)} b
    739      * @return {Number}
     739     * @return {number}
    740740     */
    741741    api.utils.prioritySort = function ( a, b ) {
     
    797797     *
    798798     * @param {jQuery} button - The element to highlight.
    799      * @param {object} [options] - Options.
     799     * @param {Object} [options] - Options.
    800800     * @param {number} [options.delay=0] - Delay in milliseconds.
    801801     * @param {jQuery} [options.focusTarget] - A target for user focus that defaults to the highlighted element.
     
    851851     * @since 4.9.0
    852852     *
    853      * @return {int} Current timestamp.
     853     * @return {number} Current timestamp.
    854854     */
    855855    api.utils.getCurrentTimestamp = function getCurrentTimestamp() {
     
    870870     * @since 4.9.0
    871871     *
    872      * @param {string|int|Date} datetime - Date time or timestamp of the future date.
    873      * @return {int} remainingTime - Remaining time in milliseconds.
     872     * @param {string|number|Date} datetime - Date time or timestamp of the future date.
     873     * @return {number} remainingTime - Remaining time in milliseconds.
    874874     */
    875875    api.utils.getRemainingTime = function getRemainingTime( datetime ) {
     
    941941         *
    942942         * @param {string}  id - The ID for the container.
    943          * @param {object}  options - Object containing one property: params.
     943         * @param {Object}  options - Object containing one property: params.
    944944         * @param {string}  options.title - Title shown when panel is collapsed and expanded.
    945945         * @param {string}  [options.description] - Description shown at the top of the panel.
     
    949949         * @param {string}  [options.content] - The markup to be used for the panel container. If empty, a JS template is used.
    950950         * @param {boolean} [options.active=true] - Whether the panel is active or not.
    951          * @param {object}  [options.params] - Deprecated wrapper for the above properties.
     951         * @param {Object}  [options.params] - Deprecated wrapper for the above properties.
    952952         */
    953953        initialize: function ( id, options ) {
     
    10561056         * @since 4.1.0
    10571057         *
    1058          * @param {String} parentType
    1059          * @param {String} childType
     1058         * @param {string} parentType
     1059         * @param {string} childType
    10601060         * @return {Array}
    10611061         */
     
    11551155         * @since 4.1.0
    11561156         *
    1157          * @param {Boolean} active
     1157         * @param {boolean} active
    11581158         * @param {Object}  [params]
    1159          * @return {Boolean} False if state already applied.
     1159         * @return {boolean} False if state already applied.
    11601160         */
    11611161        _toggleActive: function ( active, params ) {
     
    11761176        /**
    11771177         * @param {Object} [params]
    1178          * @return {Boolean} False if already active.
     1178         * @return {boolean} False if already active.
    11791179         */
    11801180        activate: function ( params ) {
     
    11841184        /**
    11851185         * @param {Object} [params]
    1186          * @return {Boolean} False if already inactive.
     1186         * @return {boolean} False if already inactive.
    11871187         */
    11881188        deactivate: function ( params ) {
     
    12011201         * Handle the toggle logic for expand/collapse.
    12021202         *
    1203          * @param {Boolean}  expanded - The new state to apply.
     1203         * @param {boolean}  expanded - The new state to apply.
    12041204         * @param {Object}   [params] - Object containing options for expand/collapse.
    12051205         * @param {Function} [params.completeCallback] - Function to call when expansion/collapse is complete.
    1206          * @return {Boolean} False if state already applied or active state is false.
     1206         * @return {boolean} False if state already applied or active state is false.
    12071207         */
    12081208        _toggleExpanded: function( expanded, params ) {
     
    12411241        /**
    12421242         * @param {Object} [params]
    1243          * @return {Boolean} False if already expanded or if inactive.
     1243         * @return {boolean} False if already expanded or if inactive.
    12441244         */
    12451245        expand: function ( params ) {
     
    12491249        /**
    12501250         * @param {Object} [params]
    1251          * @return {Boolean} False if already collapsed.
     1251         * @return {boolean} False if already collapsed.
    12521252         */
    12531253        collapse: function ( params ) {
     
    14101410         *
    14111411         * @param {string}  id - The ID for the section.
    1412          * @param {object}  options - Options.
     1412         * @param {Object}  options - Options.
    14131413         * @param {string}  options.title - Title shown when section is collapsed and expanded.
    14141414         * @param {string}  [options.description] - Description shown at the top of the section.
     
    14191419         * @param {string}  options.panel - The ID for the panel this section is associated with.
    14201420         * @param {string}  [options.customizeAction] - Additional context information shown before the section title when expanded.
    1421          * @param {object}  [options.params] - Deprecated wrapper for the above properties.
     1421         * @param {Object}  [options.params] - Deprecated wrapper for the above properties.
    14221422         */
    14231423        initialize: function ( id, options ) {
     
    15461546         * @since 4.1.0
    15471547         *
    1548          * @return {Boolean}
     1548         * @return {boolean}
    15491549         */
    15501550        isContextuallyActive: function () {
     
    15761576         * @since 4.1.0
    15771577         *
    1578          * @param {Boolean} expanded
     1578         * @param {boolean} expanded
    15791579         * @param {Object}  args
    15801580         */
     
    16981698         *
    16991699         * @param {string} id - ID.
    1700          * @param {object} options - Options.
     1700         * @param {Object} options - Options.
    17011701         * @return {void}
    17021702         */
     
    18001800         * @since 4.2.0
    18011801         *
    1802          * @return {Boolean}
     1802         * @return {boolean}
    18031803         */
    18041804        isContextuallyActive: function () {
     
    19521952         * @since 4.2.0
    19531953         *
    1954          * @param {Boolean}  expanded
     1954         * @param {boolean}  expanded
    19551955         * @param {Object}   args
    1956          * @param {Boolean}  args.unchanged
     1956         * @param {boolean}  args.unchanged
    19571957         * @param {Function} args.completeCallback
    19581958         * @return {void}
     
    21682168         * @since 4.9.0
    21692169         * @param {Array} themes - Array of theme data to create controls with.
    2170          * @param {integer} page - Page of results being loaded.
     2170         * @param {number} page - Page of results being loaded.
    21712171         * @return {void}
    21722172         */
     
    24132413         * @since 4.9.0
    24142414         *
    2415          * @return {int} Visible count.
     2415         * @return {number} Visible count.
    24162416         */
    24172417        getVisibleCount: function() {
     
    25602560         * @since 4.2.0
    25612561         *
    2562          * @param {object} theme - Theme.
     2562         * @param {Object} theme - Theme.
    25632563         * @param {Function} [callback] - Callback once the details have been shown.
    25642564         * @return {void}
     
    26682668         * @since 4.9.0
    26692669         *
    2670          * @param {Boolean}  expanded - The expanded state to transition to.
     2670         * @param {boolean}  expanded - The expanded state to transition to.
    26712671         * @param {Object}   [args] - Args.
    26722672         * @param {boolean}  [args.unchanged] - Whether the state is already known to not be changed, and so short-circuit with calling completeCallback early.
     
    27632763         *
    27642764         * @param {string}  id - The ID for the panel.
    2765          * @param {object}  options - Object containing one property: params.
     2765         * @param {Object}  options - Object containing one property: params.
    27662766         * @param {string}  options.title - Title shown when panel is collapsed and expanded.
    27672767         * @param {string}  [options.description] - Description shown at the top of the panel.
     
    27702770         * @param {string}  [options.content] - The markup to be used for the panel container. If empty, a JS template is used.
    27712771         * @param {boolean} [options.active=true] - Whether the panel is active or not.
    2772          * @param {object}  [options.params] - Deprecated wrapper for the above properties.
     2772         * @param {Object}  [options.params] - Deprecated wrapper for the above properties.
    27732773         */
    27742774        initialize: function ( id, options ) {
     
    29062906         * @since 4.1.0
    29072907         *
    2908          * @param {Boolean}  expanded
     2908         * @param {boolean}  expanded
    29092909         * @param {Object}   args
    2910          * @param {Boolean}  args.unchanged
     2910         * @param {boolean}  args.unchanged
    29112911         * @param {Function} args.completeCallback
    29122912         * @return {void}
     
    30373037         *
    30383038         * @param {string} id - The ID for the panel.
    3039          * @param {object} options - Options.
     3039         * @param {Object} options - Options.
    30403040         * @return {void}
    30413041         */
     
    31343134         * @since 4.9.0
    31353135         *
    3136          * @param {Boolean}  expanded - Expanded state.
     3136         * @param {boolean}  expanded - Expanded state.
    31373137         * @param {Object}   args - Args.
    3138          * @param {Boolean}  args.unchanged - Whether or not the state changed.
     3138         * @param {boolean}  args.unchanged - Whether or not the state changed.
    31393139         * @param {Function} args.completeCallback - Callback to execute when the animation completes.
    31403140         * @return {void}
     
    34833483         *
    34843484         * @param {string} id                       - Unique identifier for the control instance.
    3485          * @param {object} options                  - Options hash for the control instance.
    3486          * @param {object} options.type             - Type of control (e.g. text, radio, dropdown-pages, etc.)
     3485         * @param {Object} options                  - Options hash for the control instance.
     3486         * @param {Object} options.type             - Type of control (e.g. text, radio, dropdown-pages, etc.)
    34873487         * @param {string} [options.content]        - The HTML content for the control or at least its container. This should normally be left blank and instead supplying a templateId.
    34883488         * @param {string} [options.templateId]     - Template ID for control's content.
     
    34973497         * @param {string} options.description      - Description.
    34983498         * @param {number} [options.instanceNumber] - Order in which this instance was created in relation to other instances.
    3499          * @param {object} [options.params]         - Deprecated wrapper for the above properties.
     3499         * @param {Object} [options.params]         - Deprecated wrapper for the above properties.
    35003500         * @return {void}
    35013501         */
     
    39013901         * @since 4.1.0
    39023902         *
    3903          * @param {Boolean}  active
     3903         * @param {boolean}  active
    39043904         * @param {Object}   args
    3905          * @param {Number}   args.duration
     3905         * @param {number}   args.duration
    39063906         * @param {Function} args.completeCallback
    39073907         */
     
    43564356         * Called when the "Remove" link is clicked. Empties the setting.
    43574357         *
    4358          * @param {object} event jQuery Event object
     4358         * @param {Object} event jQuery Event object
    43594359         */
    43604360        removeFile: function( event ) {
     
    45664566         * After the image has been cropped, apply the cropped image data to the setting.
    45674567         *
    4568          * @param {object} croppedImage Cropped attachment data.
     4568         * @param {Object} croppedImage Cropped attachment data.
    45694569         */
    45704570        onCropped: function( croppedImage ) {
     
    46424642         * Return whether the image must be cropped, based on required dimensions.
    46434643         *
    4644          * @param {bool} flexW
    4645          * @param {bool} flexH
    4646          * @param {int}  dstW
    4647          * @param {int}  dstH
    4648          * @param {int}  imgW
    4649          * @param {int}  imgH
    4650          * @return {bool}
     4644         * @param {boolean} flexW
     4645         * @param {boolean} flexH
     4646         * @param {number}  dstW
     4647         * @param {number}  dstH
     4648         * @param {number}  imgW
     4649         * @param {number}  imgH
     4650         * @return {boolean}
    46514651         */
    46524652        mustBeCropped: function( flexW, flexH, dstW, dstH, imgW, imgH ) {
     
    46854685         * Updates the setting and re-renders the control UI.
    46864686         *
    4687          * @param {object} attachment
     4687         * @param {Object} attachment
    46884688         */
    46894689        setImageFromAttachment: function( attachment ) {
     
    47714771         * Updates the setting and re-renders the control UI.
    47724772         *
    4773          * @param {object} attachment
     4773         * @param {Object} attachment
    47744774         */
    47754775        setImageFromAttachment: function( attachment ) {
     
    48004800         * Called when the "Remove" link is clicked. Empties the setting.
    48014801         *
    4802          * @param {object} event jQuery Event object
     4802         * @param {Object} event jQuery Event object
    48034803         */
    48044804        removeFile: function( event ) {
     
    50105010         * After the image has been cropped, apply the cropped image data to the setting.
    50115011         *
    5012          * @param {object} croppedImage Cropped attachment data.
     5012         * @param {Object} croppedImage Cropped attachment data.
    50135013         */
    50145014        onCropped: function(croppedImage) {
     
    50235023         * If cropping was skipped, apply the image data directly to the setting.
    50245024         *
    5025          * @param {object} selection
     5025         * @param {Object} selection
    50265026         */
    50275027        onSkippedCrop: function(selection) {
     
    50375037         * collection.
    50385038         *
    5039          * @param {String} url
    5040          * @param {Number} attachmentId
    5041          * @param {Number} width
    5042          * @param {Number} height
     5039         * @param {string} url
     5040         * @param {number} attachmentId
     5041         * @param {number} width
     5042         * @param {number} height
    50435043         */
    50445044        setImageFromURL: function(url, attachmentId, width, height) {
     
    52465246         * @since 4.9.0
    52475247         * @param {string} id      - Unique identifier for the control instance.
    5248          * @param {object} options - Options hash for the control instance.
     5248         * @param {Object} options - Options hash for the control instance.
    52495249         * @return {void}
    52505250         */
     
    53855385         *
    53865386         * @since 4.9.0
    5387          * @param {object} codeEditorSettings - Code editor settings.
     5387         * @param {Object} codeEditorSettings - Code editor settings.
    53885388         * @return {void}
    53895389         */
     
    56275627         *
    56285628         * @param {string} datetime - Date/Time string. Accepts Y-m-d[ H:i[:s]] format.
    5629          * @return {object|null} Returns object containing date components or null if parse error.
     5629         * @return {Object|null} Returns object containing date components or null if parse error.
    56305630         */
    56315631        parseDateTime: function parseDateTime( datetime ) {
     
    62196219         * @augments   wp.customize.Messenger
    62206220         *
    6221          * @param {object} params.container
    6222          * @param {object} params.previewUrl
    6223          * @param {object} params.query
    6224          * @param {object} options
     6221         * @param {Object} params.container
     6222         * @param {Object} params.previewUrl
     6223         * @param {Object} params.query
     6224         * @param {Object} options
    62256225         */
    62266226        initialize: function( params, options ) {
     
    62496249         * Run the preview request.
    62506250         *
    6251          * @param {object} deferred jQuery Deferred object to be resolved with
     6251         * @param {Object} deferred jQuery Deferred object to be resolved with
    62526252         *                          the request.
    62536253         */
     
    64576457         * @augments   wp.customize.Messenger
    64586458         *
    6459          * @param {array}  params.allowedUrls
     6459         * @param {Array}  params.allowedUrls
    64606460         * @param {string} params.container   A selector or jQuery element for the preview
    64616461         *                                    frame to be placed.
    64626462         * @param {string} params.form
    64636463         * @param {string} params.previewUrl  The URL to preview.
    6464          * @param {object} options
     6464         * @param {Object} options
    64656465         */
    64666466        initialize: function( params, options ) {
     
    66106610         * @access public
    66116611         *
    6612          * @param {object} data - Data from preview.
     6612         * @param {Object} data - Data from preview.
    66136613         * @param {string} data.currentUrl - Current URL.
    6614          * @param {object} data.activePanels - Active panels.
    6615          * @param {object} data.activeSections Active sections.
    6616          * @param {object} data.activeControls Active controls.
     6614         * @param {Object} data.activePanels - Active panels.
     6615         * @param {Object} data.activeSections Active sections.
     6616         * @param {Object} data.activeControls Active controls.
    66176617         * @return {void}
    66186618         */
     
    69186918     * @private
    69196919     *
    6920      * @param {object}  args
    6921      * @param {object}  args.settingValidities
     6920     * @param {Object}  args
     6921     * @param {Object}  args.settingValidities
    69226922     * @param {boolean} [args.focusInvalidControl=false]
    69236923     * @return {void}
     
    69946994     * @since 4.6.0
    69956995     * @param {string[]} settingIds Setting IDs.
    6996      * @return {object<string, wp.customize.Control>} Mapping setting ids to arrays of controls.
     6996     * @return {Object<string, wp.customize.Control>} Mapping setting ids to arrays of controls.
    69976997     */
    69986998    api.findControlsForSettings = function findControlsForSettings( settingIds ) {
     
    74027402             * @access public
    74037403             *
    7404              * @param {object}  [options] Options.
     7404             * @param {Object}  [options] Options.
    74057405             * @param {boolean} [options.excludeCustomizedSaved=false] Exclude saved settings in customized response (values pending writing to changeset).
    7406              * @return {object} Query vars.
     7406             * @return {Object} Query vars.
    74077407             */
    74087408            query: function( options ) {
     
    74407440             * @since 4.7.0 Added args param and return value.
    74417441             *
    7442              * @param {object} [args] Args.
     7442             * @param {Object} [args] Args.
    74437443             * @param {string} [args.status=publish] Status.
    74447444             * @param {string} [args.date] Date, in local time in MySQL format.
     
    81228122                 *
    81238123                 * @param {string} [code] - Code.
    8124                  * @param {object} [params] - Params.
     8124                 * @param {Object} [params] - Params.
    81258125                 */
    81268126                initialize: function( code, params ) {
     
    82118211             * @since 4.9.0
    82128212             *
    8213              * @param {object} [args] - Args.
    8214              * @param {object} [args.lockUser] - Lock user data.
     8213             * @param {Object} [args] - Args.
     8214             * @param {Object} [args.lockUser] - Lock user data.
    82158215             * @param {boolean} [args.allowOverride=false] - Whether override is allowed.
    82168216             * @return {void}
     
    86388638             * @access private
    86398639             *
    8640              * @param {object} header - Header.
     8640             * @param {Object} header - Header.
    86418641             * @param {number} scrollTop - Scroll top.
    86428642             * @param {number} scrollDirection - Scroll direction, negative number being up and positive being down.
  • trunk/src/js/_enqueues/wp/customize/nav-menus.js

    r48461 r48650  
    9696     * @alias wp.customize.Menus.insertAutoDraftPost
    9797     *
    98      * @param {object} params - Parameters for the draft post to create.
     98     * @param {Object} params - Parameters for the draft post to create.
    9999     * @param {string} params.post_type - Post type to add.
    100100     * @param {string} params.post_title - Post title to use.
     
    388388         * @access private
    389389         *
    390          * @param {Array.<object>} itemTypes List of objects containing type and key.
     390         * @param {Array.<Object>} itemTypes List of objects containing type and key.
    391391         * @param {string} deprecated Formerly the object parameter.
    392392         * @return {void}
     
    906906         * @since 4.3.0
    907907         *
    908          * @param {String} id
     908         * @param {string} id
    909909         * @param {Object} options
    910910         */
     
    22132213         * @private
    22142214         *
    2215          * @param {Number} offset 1|-1
     2215         * @param {number} offset 1|-1
    22162216         */
    22172217        _changePosition: function( offset ) {
     
    22732273         * @private
    22742274         *
    2275          * @param {Number} offset 1|-1
     2275         * @param {number} offset 1|-1
    22762276         */
    22772277        _changeDepth: function( offset ) {
     
    26562656         * which is called in MenuSection.onChangeExpanded()
    26572657         *
    2658          * @param {object} menuList - The element that has sortable().
     2658         * @param {Object} menuList - The element that has sortable().
    26592659         */
    26602660        _setupSortable: function( menuList ) {
     
    28552855         * Enable/disable the reordering UI
    28562856         *
    2857          * @param {Boolean} showOrHide to enable/disable reordering
     2857         * @param {boolean} showOrHide to enable/disable reordering
    28582858         */
    28592859        toggleReordering: function( showOrHide ) {
     
    29952995         * Add a new item to this menu.
    29962996         *
    2997          * @param {object} item - Value for the nav_menu_item setting to be created.
     2997         * @param {Object} item - Value for the nav_menu_item setting to be created.
    29982998         * @return {wp.customize.Menus.controlConstructor.nav_menu_item} The newly-created nav_menu_item control instance.
    29992999         */
     
    31363136     * @alias wp.customize.Menus.applySavedData
    31373137     *
    3138      * @param {object} data
    3139      * @param {array} data.nav_menu_updates
    3140      * @param {array} data.nav_menu_item_updates
     3138     * @param {Object} data
     3139     * @param {Array} data.nav_menu_updates
     3140     * @param {Array} data.nav_menu_item_updates
    31413141     */
    31423142    api.Menus.applySavedData = function( data ) {
     
    33953395     *
    33963396     * @param {string} menuItemId
    3397      * @return {object|null}
     3397     * @return {Object|null}
    33983398     */
    33993399    api.Menus.getMenuItemControl = function( menuItemId ) {
     
    34043404     * @alias wp.customize.Menus~menuItemIdToSettingId
    34053405     *
    3406      * @param {String} menuItemId
     3406     * @param {string} menuItemId
    34073407     */
    34083408    function menuItemIdToSettingId( menuItemId ) {
  • trunk/src/js/_enqueues/wp/customize/preview-nav-menus.js

    r46800 r48650  
    9999             * @param {string} [options.params.navMenuArgs.theme_location]
    100100             * @param {number} [options.params.navMenuArgs.menu]
    101              * @param {object} [options.constructingContainerContext]
     101             * @param {Object} [options.constructingContainerContext]
    102102             */
    103103            initialize: function( id, options ) {
     
    133133             * @since 4.5.0
    134134             * @param {wp.customize.Value|string} setting  - Object or ID.
    135              * @param {number|object|false|null}  newValue - New value, or null if the setting was just removed.
    136              * @param {number|object|false|null}  oldValue - Old value, or null if the setting was just added.
     135             * @param {number|Object|false|null}  newValue - New value, or null if the setting was just removed.
     136             * @param {number|Object|false|null}  oldValue - Old value, or null if the setting was just added.
    137137             * @return {boolean}
    138138             */
     
    264264         * Request full refresh if there are nav menu instances that lack partials which also match the supplied args.
    265265         *
    266          * @param {object} navMenuInstanceArgs
     266         * @param {Object} navMenuInstanceArgs
    267267         */
    268268        self.handleUnplacedNavMenuInstances = function( navMenuInstanceArgs ) {
     
    284284         *
    285285         * @param {wp.customize.Value} setting
    286          * @param {object}             [options]
     286         * @param {Object}             [options]
    287287         * @param {boolean}            options.fire Whether to invoke the callback after binding.
    288288         *                                          This is used when a dynamic setting is added.
     
    371371         * @since 4.5.0
    372372         *
    373          * @param {object} newItem New value for nav_menu_item[] setting.
    374          * @param {object} oldItem Old value for nav_menu_item[] setting.
     373         * @param {Object} newItem New value for nav_menu_item[] setting.
     374         * @param {Object} oldItem Old value for nav_menu_item[] setting.
    375375         * @this {wp.customize.Value}
    376376         */
  • trunk/src/js/_enqueues/wp/customize/preview.js

    r47122 r48650  
    103103    api.Preview = api.Messenger.extend(/** @lends wp.customize.Preview.prototype */{
    104104        /**
    105          * @param {object} params  - Parameters to configure the messenger.
    106          * @param {object} options - Extend any instance parameter or method with this object.
     105         * @param {Object} params  - Parameters to configure the messenger.
     106         * @param {Object} options - Extend any instance parameter or method with this object.
    107107         */
    108108        initialize: function( params, options ) {
     
    277277     * @param {string} element.pathname Path.
    278278     * @param {string} element.host Host.
    279      * @param {object} [options]
    280      * @param {object} [options.allowAdminAjax=false] Allow admin-ajax.php requests.
     279     * @param {Object} [options]
     280     * @param {Object} [options.allowAdminAjax=false] Allow admin-ajax.php requests.
    281281     * @return {boolean} Is appropriate for changeset link.
    282282     */
     
    400400         * Rewrite Ajax requests to inject customizer state.
    401401         *
    402          * @param {object} options Options.
     402         * @param {Object} options Options.
    403403         * @param {string} options.type Type.
    404404         * @param {string} options.url URL.
    405          * @param {object} originalOptions Original options.
     405         * @param {Object} originalOptions Original options.
    406406         * @param {XMLHttpRequest} xhr XHR.
    407407         * @return {void}
  • trunk/src/js/_enqueues/wp/customize/selective-refresh.js

    r47122 r48650  
    6161         *
    6262         * @param {string} id                      - Unique identifier for the partial instance.
    63          * @param {object} options                 - Options hash for the partial instance.
     63         * @param {Object} options                 - Options hash for the partial instance.
    6464         * @param {string} options.type            - Type of partial (e.g. nav_menu, widget, etc)
    6565         * @param {string} options.selector        - jQuery selector to find the container element in the page.
    66          * @param {array}  options.settings        - The IDs for the settings the partial relates to.
     66         * @param {Array}  options.settings        - The IDs for the settings the partial relates to.
    6767         * @param {string} options.primarySetting  - The ID for the primary setting the partial renders.
    68          * @param {bool}   options.fallbackRefresh - Whether to refresh the entire preview in case of a partial refresh failure.
    69          * @param {object} [options.params]        - Deprecated wrapper for the above properties.
     68         * @param {boolean}   options.fallbackRefresh - Whether to refresh the entire preview in case of a partial refresh failure.
     69         * @param {Object} [options.params]        - Deprecated wrapper for the above properties.
    7070         */
    7171        initialize: function( id, options ) {
     
    286286         * @since 4.5.0
    287287         *
    288          * @return {String[]}
     288         * @return {string[]}
    289289         */
    290290        settings: function() {
     
    407407         * @param {Placement}             placement
    408408         * @param {Element|jQuery}        [placement.container]  - This param will be empty if there was no element matching the selector.
    409          * @param {string|object|boolean} placement.addedContent - Rendered HTML content, a data object for JS templates to render, or false if no render.
    410          * @param {object}                [placement.context]    - Optional context information about the container.
     409         * @param {string|Object|boolean} placement.addedContent - Rendered HTML content, a data object for JS templates to render, or false if no render.
     410         * @param {Object}                [placement.context]    - Optional context information about the container.
    411411         * @return {boolean} Whether the rendering was successful and the fallback was not invoked.
    412412         */
     
    603603         * @since 4.5.0
    604604         *
    605          * @param {object}                   args
     605         * @param {Object}                   args
    606606         * @param {Partial}                  args.partial
    607607         * @param {jQuery|Element}           [args.container]
    608608         * @param {Node}                     [args.startNode]
    609609         * @param {Node}                     [args.endNode]
    610          * @param {object}                   [args.context]
     610         * @param {Object}                   [args.context]
    611611         * @param {string}                   [args.addedContent]
    612612         * @param {jQuery|DocumentFragment}  [args.removedNodes]
     
    646646     * @see wp.customize.previewer.query()
    647647     *
    648      * @return {object}
     648     * @return {Object}
    649649     */
    650650    self.getCustomizeQuery = function() {
  • trunk/src/js/_enqueues/wp/customize/widgets.js

    r48461 r48650  
    460460         * @param {jQuery.Event} e
    461461         * @param {jQuery} widget
    462          * @param {String} newForm
     462         * @param {string} newForm
    463463         */
    464464        rss: function( e, widget, newForm ) {
     
    969969         * @since 4.1.0
    970970         *
    971          * @param {Boolean}   active
     971         * @param {boolean}   active
    972972         * @param {Object}    args
    973973         * @param {function}  args.completeCallback
     
    10761076         *
    10771077         * @param {jQuery|Element} input
    1078          * @return {string|boolean|array|*}
     1078         * @return {string|boolean|Array|*}
    10791079         * @private
    10801080         */
     
    10961096         *
    10971097         * @param {jQuery|Element} input
    1098          * @param {string|boolean|array|*} state
     1098         * @param {string|boolean|Array|*} state
    10991099         * @private
    11001100         */
     
    11441144         * along with the new widget control form to render.
    11451145         *
    1146          * @param {object} [args]
     1146         * @param {Object} [args]
    11471147         * @param {Object|null} [args.instance=null]  When the model changes, the instance is sent here; otherwise, the inputs from the form are used
    11481148         * @param {Function|null} [args.complete=null]  Function which is called when the request finishes. Context is bound to the control. First argument is any error. Following arguments are for success.
    1149          * @param {Boolean} [args.ignoreActiveElement=false] Whether or not updating a field will be deferred if focus is still on the element.
     1149         * @param {boolean} [args.ignoreActiveElement=false] Whether or not updating a field will be deferred if focus is still on the element.
    11501150         */
    11511151        updateWidget: function( args ) {
     
    13991399         * Respond to change in the expanded state.
    14001400         *
    1401          * @param {Boolean} expanded
     1401         * @param {boolean} expanded
    14021402         * @param {Object} args  merged on top of this.defaultActiveArguments
    14031403         */
     
    14991499         * Get the position (index) of the widget in the containing sidebar
    15001500         *
    1501          * @return {Number}
     1501         * @return {number}
    15021502         */
    15031503        getWidgetSidebarPosition: function() {
     
    15311531         * @private
    15321532         *
    1533          * @param {Number} offset 1|-1
     1533         * @param {number} offset 1|-1
    15341534         */
    15351535        _moveWidgetByOne: function( offset ) {
     
    15501550         * Toggle visibility of the widget move area
    15511551         *
    1552          * @param {Boolean} [showOrHide]
     1552         * @param {boolean} [showOrHide]
    15531553         */
    15541554        toggleWidgetMoveArea: function( showOrHide ) {
     
    20082008         * Enable/disable the reordering UI
    20092009         *
    2010          * @param {Boolean} showOrHide to enable/disable reordering
     2010         * @param {boolean} showOrHide to enable/disable reordering
    20112011         *
    20122012         * @todo We should have a reordering state instead and rename this to onChangeReordering
     
    20662066        /**
    20672067         * @param {string} widgetId or an id_base for adding a previously non-existing widget.
    2068          * @return {object|false} widget_form control instance, or false on error.
     2068         * @return {Object|false} widget_form control instance, or false on error.
    20692069         */
    20702070        addWidget: function( widgetId ) {
     
    22472247     * Given a widget control, find the sidebar widgets control that contains it.
    22482248     * @param {string} widgetId
    2249      * @return {object|null}
     2249     * @return {Object|null}
    22502250     */
    22512251    api.Widgets.getSidebarWidgetControlContainingWidget = function( widgetId ) {
     
    22662266     *
    22672267     * @param {string} widgetId
    2268      * @return {object|null}
     2268     * @return {Object|null}
    22692269     */
    22702270    api.Widgets.getWidgetFormControlForWidget = function( widgetId ) {
     
    23342334
    23352335    /**
    2336      * @param {String} widgetId
     2336     * @param {string} widgetId
    23372337     * @return {Object}
    23382338     */
     
    23562356
    23572357    /**
    2358      * @param {String} widgetId
    2359      * @return {String} settingId
     2358     * @param {string} widgetId
     2359     * @return {string} settingId
    23602360     */
    23612361    function widgetIdToSettingId( widgetId ) {
  • trunk/src/js/_enqueues/wp/editor/base.js

    r47122 r48650  
    474474         * to run after the markers are added.
    475475         *
    476          * @param {object} $textarea TinyMCE's textarea wrapped as a DomQuery object
     476         * @param {Object} $textarea TinyMCE's textarea wrapped as a DomQuery object
    477477         */
    478478        function addHTMLBookmarkInTextAreaContent( $textarea ) {
     
    562562         * When removing selection markers an empty `<p>` may be left behind, remove it.
    563563         *
    564          * @param {object} $marker The marker to be removed from the editor DOM, wrapped in an instnce of `editor.$`
     564         * @param {Object} $marker The marker to be removed from the editor DOM, wrapped in an instnce of `editor.$`
    565565         */
    566566        function removeSelectionMarker( $marker ) {
     
    11331133         * @memberof switchEditors
    11341134         *
    1135          * @param {String} html The content from the visual editor.
    1136          * @return {String} the filtered content.
     1135         * @param {string} html The content from the visual editor.
     1136         * @return {string} the filtered content.
    11371137         */
    11381138        function pre_wpautop( html ) {
     
    11591159         * @memberof switchEditors
    11601160         *
    1161          * @param {String} text The content from the text editor.
    1162          * @return {String} filtered content.
     1161         * @param {string} text The content from the text editor.
     1162         * @return {string} filtered content.
    11631163         */
    11641164        function wpautop( text ) {
     
    12261226     * @param {string} id The HTML id of the textarea that is used for the editor.
    12271227     *                    Has to be jQuery compliant. No brackets, special chars, etc.
    1228      * @param {object} settings Example:
     1228     * @param {Object} settings Example:
    12291229     * settings = {
    12301230     *    // See https://www.tinymce.com/docs/configure/integration-and-setup/.
  • trunk/src/js/_enqueues/wp/editor/dfw.js

    r47122 r48650  
    205205             * Gets the offset of the editor.
    206206             *
    207              * @return {Number|Boolean} Returns the offset of the editor
     207             * @return {number|boolean} Returns the offset of the editor
    208208             * or false if there is no offset height.
    209209             */
  • trunk/src/js/_enqueues/wp/mce-view.js

    r47122 r48650  
    4747         * Registers a new view type.
    4848         *
    49          * @param {String} type   The view type.
     49         * @param {string} type   The view type.
    5050         * @param {Object} extend An object to extend wp.mce.View.prototype with.
    5151         */
     
    5757         * Unregisters a view type.
    5858         *
    59          * @param {String} type The view type.
     59         * @param {string} type The view type.
    6060         */
    6161        unregister: function( type ) {
     
    6666         * Returns the settings of a view type.
    6767         *
    68          * @param {String} type The view type.
     68         * @param {string} type The view type.
    6969         *
    7070         * @return {Function} The view constructor.
     
    8989         * and creates a new instance for every match.
    9090         *
    91          * @param {String} content The string to scan.
     91         * @param {string} content The string to scan.
    9292         * @param {tinymce.Editor} editor The editor.
    9393         *
    94          * @return {String} The string with markers.
     94         * @return {string} The string with markers.
    9595         */
    9696        setMarkers: function( content, editor ) {
     
    150150         * Create a view instance.
    151151         *
    152          * @param {String}  type    The view type.
    153          * @param {String}  text    The textual representation of the view.
     152         * @param {string}  type    The view type.
     153         * @param {string}  text    The textual representation of the view.
    154154         * @param {Object}  options Options.
    155          * @param {Boolean} force   Recreate the instance. Optional.
     155         * @param {boolean} force   Recreate the instance. Optional.
    156156         *
    157157         * @return {wp.mce.View} The view instance.
     
    191191         * Get a view instance.
    192192         *
    193          * @param {(String|HTMLElement)} object The textual representation of the view or the view node.
     193         * @param {(string|HTMLElement)} object The textual representation of the view or the view node.
    194194         *
    195195         * @return {wp.mce.View} The view instance or undefined.
     
    208208         * @param {HTMLElement} node The view node.
    209209         *
    210          * @return {String} The textual representation of the view.
     210         * @return {string} The textual representation of the view.
    211211         */
    212212        getText: function( node ) {
     
    217217         * Renders all view nodes that are not yet rendered.
    218218         *
    219          * @param {Boolean} force Rerender all view nodes.
     219         * @param {boolean} force Rerender all view nodes.
    220220         */
    221221        render: function( force ) {
     
    228228         * Update the text of a given view node.
    229229         *
    230          * @param {String}         text   The new text.
     230         * @param {string}         text   The new text.
    231231         * @param {tinymce.Editor} editor The TinyMCE editor instance the view node is in.
    232232         * @param {HTMLElement}    node   The view node to update.
    233          * @param {Boolean}        force  Recreate the instance. Optional.
     233         * @param {boolean}        force  Recreate the instance. Optional.
    234234         */
    235235        update: function( text, editor, node, force ) {
     
    318318         * Renders all view nodes tied to this view instance that are not yet rendered.
    319319         *
    320          * @param {String}  content The content to render. Optional.
    321          * @param {Boolean} force   Rerender all view nodes tied to this view instance. Optional.
     320         * @param {string}  content The content to render. Optional.
     321         * @param {boolean} force   Rerender all view nodes tied to this view instance. Optional.
    322322         */
    323323        render: function( content, force ) {
     
    386386         *
    387387         * @param {Function} callback A callback.
    388          * @param {Boolean}  rendered Get (un)rendered view nodes. Optional.
     388         * @param {boolean}  rendered Get (un)rendered view nodes. Optional.
    389389         */
    390390        getNodes: function( callback, rendered ) {
     
    474474         * @param {*}        content  The content to set.
    475475         * @param {Function} callback A callback. Optional.
    476          * @param {Boolean}  rendered Only set for (un)rendered nodes. Optional.
     476         * @param {boolean}  rendered Only set for (un)rendered nodes. Optional.
    477477         */
    478478        setContent: function( content, callback, rendered ) {
     
    503503         * Sets the content in an iframe for all view nodes tied to this view instance.
    504504         *
    505          * @param {String}   head     HTML string to be added to the head of the document.
    506          * @param {String}   body     HTML string to be added to the body of the document.
     505         * @param {string}   head     HTML string to be added to the head of the document.
     506         * @param {string}   body     HTML string to be added to the body of the document.
    507507         * @param {Function} callback A callback. Optional.
    508          * @param {Boolean}  rendered Only set for (un)rendered nodes. Optional.
     508         * @param {boolean}  rendered Only set for (un)rendered nodes. Optional.
    509509         */
    510510        setIframes: function( head, body, callback, rendered ) {
     
    699699         * Sets an error for all view nodes tied to this view instance.
    700700         *
    701          * @param {String} message  The error message to set.
    702          * @param {String} dashicon A dashicon ID. Optional. {@link https://developer.wordpress.org/resource/dashicons/}
     701         * @param {string} message  The error message to set.
     702         * @param {string} dashicon A dashicon ID. Optional. {@link https://developer.wordpress.org/resource/dashicons/}
    703703         */
    704704        setError: function( message, dashicon ) {
     
    714714         * Tries to find a text match in a given string.
    715715         *
    716          * @param {String} content The string to scan.
     716         * @param {string} content The string to scan.
    717717         *
    718718         * @return {Object}
     
    735735         * Update the text of a given view node.
    736736         *
    737          * @param {String}         text   The new text.
     737         * @param {string}         text   The new text.
    738738         * @param {tinymce.Editor} editor The TinyMCE editor instance the view node is in.
    739739         * @param {HTMLElement}    node   The view node to update.
    740          * @param {Boolean}        force  Recreate the instance. Optional.
     740         * @param {boolean}        force  Recreate the instance. Optional.
    741741         */
    742742        update: function( text, editor, node, force ) {
  • trunk/src/js/_enqueues/wp/media/editor.js

    r48396 r48650  
    2020     *   but has a default value, set it.
    2121     *
    22      * @param {object} attrs Map of props from a shortcode or settings.
     22     * @param {Object} attrs Map of props from a shortcode or settings.
    2323     * @param {string} key The key within the passed map to check for a value.
    2424     * @return {mixed|undefined} The original or coerced value of key within attrs.
  • trunk/src/js/_enqueues/wp/media/models.js

    r48110 r48650  
    1818 * @namespace
    1919 *
    20  * @param {object} attributes The properties passed to the main media controller.
     20 * @param {Object} attributes The properties passed to the main media controller.
    2121 * @return {wp.media.view.MediaFrame} A media workflow.
    2222 */
     
    184184     * Useful for filenames.
    185185     *
    186      * @param {String} string
    187      * @param {Number} [length=30]
    188      * @param {String} [replacement=&hellip;]
    189      * @return {String} The string, unless length is greater than string.length.
     186     * @param {string} string
     187     * @param {number} [length=30]
     188     * @param {string} [replacement=&hellip;]
     189     * @return {string} The string, unless length is greater than string.length.
    190190     */
    191191    truncate: function( string, length, replacement ) {
     
    210210 *
    211211 * @static
    212  * @param {String} id A string used to identify a model.
     212 * @param {string} id A string used to identify a model.
    213213 * @return {wp.media.model.Attachment}
    214214 */
     
    230230 * Shorthand for creating a new Attachments Query.
    231231 *
    232  * @param {object} [props]
     232 * @param {Object} [props]
    233233 * @return {wp.media.model.Attachments}
    234234 */
  • trunk/src/js/_enqueues/wp/media/views.js

    r47122 r48650  
    4949 *
    5050 * @param {string} selector
    51  * @param {Number} sensitivity
     51 * @param {number} sensitivity
    5252 * @return {Promise}
    5353 */
  • trunk/src/js/_enqueues/wp/theme-plugin-editor.js

    r48346 r48650  
    2828     *
    2929     * @param {jQuery}         form - Form element.
    30      * @param {object}         settings - Settings.
    31      * @param {object|boolean} settings.codeEditor - Code editor settings (or `false` if syntax highlighting is disabled).
     30     * @param {Object}         settings - Settings.
     31     * @param {Object|boolean} settings.codeEditor - Code editor settings (or `false` if syntax highlighting is disabled).
    3232     * @return {void}
    3333     */
     
    118118     *
    119119     * @since 4.9.0
    120      * @param {object} event jQuery event object.
     120     * @param {Object} event jQuery event object.
    121121     * @return {void}
    122122     */
     
    255255     * @since 4.9.0
    256256     *
    257      * @param {object}   notice - Notice.
     257     * @param {Object}   notice - Notice.
    258258     * @param {string}   notice.code - Code.
    259259     * @param {string}   notice.type - Type.
  • trunk/src/js/_enqueues/wp/theme.js

    r48106 r48650  
    14291429 *
    14301430 * @param {string} url - URL to navigate to.
    1431  * @param {object} state - State.
     1431 * @param {Object} state - State.
    14321432 * @return {void}
    14331433 */
     
    18421842     * Get the checked filters.
    18431843     *
    1844      * @return {array} of tags or false
     1844     * @return {Array} of tags or false
    18451845     */
    18461846    filtersChecked: function() {
  • trunk/src/js/_enqueues/wp/updates.js

    r48589 r48650  
    151151     * @since 4.6.0
    152152     *
    153      * @param {object}  data
     153     * @param {Object}  data
    154154     * @param {*=}      data.selector      Optional. Selector of an element to be replaced with the admin notice.
    155155     * @param {string=} data.id            Optional. Unique id that will be used as the notice's id attribute.
     
    195195     *
    196196     * @param {string} action The type of Ajax request ('update-plugin', 'install-theme', etc).
    197      * @param {object} data   Data that needs to be passed to the ajax callback.
     197     * @param {Object} data   Data that needs to be passed to the ajax callback.
    198198     * @return {$.promise}    A jQuery promise that represents the request,
    199199     *                        decorated with an abort() method.
     
    244244     * @since 4.6.0
    245245     *
    246      * @param {object}  response
    247      * @param {array=}  response.debug     Optional. Debug information.
     246     * @param {Object}  response
     247     * @param {Array=}  response.debug     Optional. Debug information.
    248248     * @param {string=} response.errorCode Optional. Error code for an error that occurred.
    249249     */
     
    356356     * @since 4.6.0 More accurately named `updatePlugin`.
    357357     *
    358      * @param {object}               args         Arguments.
     358     * @param {Object}               args         Arguments.
    359359     * @param {string}               args.plugin  Plugin basename.
    360360     * @param {string}               args.slug    Plugin slug.
     
    413413     * @since 5.5.0 Auto-update "time to next update" text cleared.
    414414     *
    415      * @param {object} response            Response from the server.
     415     * @param {Object} response            Response from the server.
    416416     * @param {string} response.slug       Slug of the plugin to be updated.
    417417     * @param {string} response.plugin     Basename of the plugin to be updated.
     
    467467     * @since 4.6.0 More accurately named `updatePluginError`.
    468468     *
    469      * @param {object}  response              Response from the server.
     469     * @param {Object}  response              Response from the server.
    470470     * @param {string}  response.slug         Slug of the plugin to be updated.
    471471     * @param {string}  response.plugin       Basename of the plugin to be updated.
     
    563563     * @since 4.6.0
    564564     *
    565      * @param {object}                args         Arguments.
     565     * @param {Object}                args         Arguments.
    566566     * @param {string}                args.slug    Plugin identifier in the WordPress.org Plugin repository.
    567567     * @param {installPluginSuccess=} args.success Optional. Success callback. Default: wp.updates.installPluginSuccess
     
    614614     * @since 4.6.0
    615615     *
    616      * @param {object} response             Response from the server.
     616     * @param {Object} response             Response from the server.
    617617     * @param {string} response.slug        Slug of the installed plugin.
    618618     * @param {string} response.pluginName  Name of the installed plugin.
     
    679679     * @since 4.6.0
    680680     *
    681      * @param {object}  response              Response from the server.
     681     * @param {Object}  response              Response from the server.
    682682     * @param {string}  response.slug         Slug of the plugin to be installed.
    683683     * @param {string=} response.pluginName   Optional. Name of the plugin to be installed.
     
    740740     * @since 4.6.0
    741741     *
    742      * @param {object} response             Response from the server.
     742     * @param {Object} response             Response from the server.
    743743     * @param {string} response.slug        Slug of the installed plugin.
    744744     * @param {string} response.pluginName  Name of the installed plugin.
     
    779779     * @since 4.6.0
    780780     *
    781      * @param {object}  response              Response from the server.
     781     * @param {Object}  response              Response from the server.
    782782     * @param {string}  response.slug         Slug of the plugin to be installed.
    783783     * @param {string=} response.pluginName   Optional. Name of the plugin to be installed.
     
    830830     * @since 4.6.0
    831831     *
    832      * @param {object}               args         Arguments.
     832     * @param {Object}               args         Arguments.
    833833     * @param {string}               args.plugin  Basename of the plugin to be deleted.
    834834     * @param {string}               args.slug    Slug of the plugin to be deleted.
     
    957957     * @since 4.6.0
    958958     *
    959      * @param {object}  response              Response from the server.
     959     * @param {Object}  response              Response from the server.
    960960     * @param {string}  response.slug         Slug of the plugin to be deleted.
    961961     * @param {string}  response.plugin       Base name of the plugin to be deleted
     
    10141014     * @since 4.6.0
    10151015     *
    1016      * @param {object}              args         Arguments.
     1016     * @param {Object}              args         Arguments.
    10171017     * @param {string}              args.slug    Theme stylesheet.
    10181018     * @param {updateThemeSuccess=} args.success Optional. Success callback. Default: wp.updates.updateThemeSuccess
     
    10701070     * @since 5.5.0 Auto-update "time to next update" text cleared.
    10711071     *
    1072      * @param {object} response
     1072     * @param {Object} response
    10731073     * @param {string} response.slug       Slug of the theme to be updated.
    1074      * @param {object} response.theme      Updated theme.
     1074     * @param {Object} response.theme      Updated theme.
    10751075     * @param {string} response.oldVersion Old version of the theme.
    10761076     * @param {string} response.newVersion New version of the theme.
     
    11351135     * @since 4.6.0
    11361136     *
    1137      * @param {object} response              Response from the server.
     1137     * @param {Object} response              Response from the server.
    11381138     * @param {string} response.slug         Slug of the theme to be updated.
    11391139     * @param {string} response.errorCode    Error code for the error that occurred.
     
    11851185     * @since 4.6.0
    11861186     *
    1187      * @param {object}               args
     1187     * @param {Object}               args
    11881188     * @param {string}               args.slug    Theme stylesheet.
    11891189     * @param {installThemeSuccess=} args.success Optional. Success callback. Default: wp.updates.installThemeSuccess
     
    12321232     * @since 4.6.0
    12331233     *
    1234      * @param {object} response              Response from the server.
     1234     * @param {Object} response              Response from the server.
    12351235     * @param {string} response.slug         Slug of the theme to be installed.
    12361236     * @param {string} response.customizeUrl URL to the Customizer for the just installed theme.
     
    13111311     * @since 4.6.0
    13121312     *
    1313      * @param {object} response              Response from the server.
     1313     * @param {Object} response              Response from the server.
    13141314     * @param {string} response.slug         Slug of the theme to be installed.
    13151315     * @param {string} response.errorCode    Error code for the error that occurred.
     
    13771377     * @since 4.6.0
    13781378     *
    1379      * @param {object}              args
     1379     * @param {Object}              args
    13801380     * @param {string}              args.slug    Theme stylesheet.
    13811381     * @param {deleteThemeSuccess=} args.success Optional. Success callback. Default: wp.updates.deleteThemeSuccess
     
    14191419     * @since 4.6.0
    14201420     *
    1421      * @param {object} response      Response from the server.
     1421     * @param {Object} response      Response from the server.
    14221422     * @param {string} response.slug Slug of the theme that was deleted.
    14231423     */
     
    14771477     * @since 4.6.0
    14781478     *
    1479      * @param {object} response              Response from the server.
     1479     * @param {Object} response              Response from the server.
    14801480     * @param {string} response.slug         Slug of the theme to be deleted.
    14811481     * @param {string} response.errorCode    Error code for the error that occurred.
     
    15321532     * @private
    15331533     *
    1534      * @param {object} data   Ajax payload.
     1534     * @param {Object} data   Ajax payload.
    15351535     * @param {string} action The type of request to perform.
    1536      * @return {object} The Ajax payload with the appropriate callbacks.
     1536     * @return {Object} The Ajax payload with the appropriate callbacks.
    15371537     */
    15381538    wp.updates._addCallbacks = function( data, action ) {
     
    17261726     * @since 4.2.0
    17271727     *
    1728      * @param {object} response Ajax response.
     1728     * @param {Object} response Ajax response.
    17291729     * @param {string} action   The type of request to perform.
    17301730     */
     
    17541754     * @since 4.6.0
    17551755     *
    1756      * @param {object} response              Response from the server.
     1756     * @param {Object} response              Response from the server.
    17571757     * @param {string} response.errorCode    Error code for the error that occurred.
    17581758     * @param {string} response.errorMessage The error that occurred.
     
    17741774     * If the response deems to be invalid, an admin notice is being displayed.
    17751775     *
    1776      * @param {(object|string)} response              Response from the server.
     1776     * @param {(Object|string)} response              Response from the server.
    17771777     * @param {function=}       response.always       Optional. Callback for when the Deferred is resolved or rejected.
    17781778     * @param {string=}         response.statusText   Optional. Status message corresponding to the status code.
  • trunk/src/js/_enqueues/wp/util.js

    r48110 r48650  
    5757         * Sends a POST request to WordPress.
    5858         *
    59          * @param {(string|object)} action The slug of the action to fire in WordPress or options passed
     59         * @param {(string|Object)} action The slug of the action to fire in WordPress or options passed
    6060         *                                 to jQuery.ajax.
    61          * @param {object=}         data   Optional. The data to populate $_POST with.
     61         * @param {Object=}         data   Optional. The data to populate $_POST with.
    6262         * @return {$.promise} A jQuery promise that represents the request,
    6363         *                     decorated with an abort() method.
     
    7474         * Sends a POST request to WordPress.
    7575         *
    76          * @param {(string|object)} action  The slug of the action to fire in WordPress or options passed
     76         * @param {(string|Object)} action  The slug of the action to fire in WordPress or options passed
    7777         *                                  to jQuery.ajax.
    78          * @param {object=}         options Optional. The options passed to jQuery.ajax.
     78         * @param {Object=}         options Optional. The options passed to jQuery.ajax.
    7979         * @return {$.promise} A jQuery promise that represents the request,
    8080         *                     decorated with an abort() method.
  • trunk/src/js/_enqueues/wp/utils/word-count.js

    r47122 r48650  
    3939     * @param {Object} settings.l10n                              Optional. Localization object containing specific
    4040     *                                                            configuration for the current localization.
    41      * @param {String} settings.l10n.type                         Optional. Method of finding words to count.
     41     * @param {string} settings.l10n.type                         Optional. Method of finding words to count.
    4242     * @param {Array}  settings.l10n.shortcodes                   Optional. Array of shortcodes that should be removed
    4343     *                                                            from the text.
     
    149149     * @memberof wp.utils.wordcounter
    150150     *
    151      * @param {String}  text Text to count elements in.
    152      * @param {String}  type Optional. Specify type to use.
    153      *
    154      * @return {Number} The number of items counted.
     151     * @param {string}  text Text to count elements in.
     152     * @param {string}  type Optional. Specify type to use.
     153     *
     154     * @return {number} The number of items counted.
    155155     */
    156156    WordCounter.prototype.count = function( text, type ) {
  • trunk/src/js/_enqueues/wp/widgets/custom-html.js

    r46800 r48650  
    414414     * @alias wp.customHtmlWidgets.init
    415415     *
    416      * @param {object} settings - Options for code editor, exported from PHP.
     416     * @param {Object} settings - Options for code editor, exported from PHP.
    417417     *
    418418     * @return {void}
  • trunk/src/js/_enqueues/wp/widgets/media.js

    r46800 r48650  
    101101         * @since 4.9.0
    102102         *
    103          * @param {object} options - Options.
     103         * @param {Object} options - Options.
    104104         * @return {void}
    105105         */
  • trunk/src/js/media/controllers/library.js

    r47030 r48650  
    192192     *
    193193     * @param {wp.media.model.Attachment} attachment
    194      * @return {Boolean}
     194     * @return {boolean}
    195195     */
    196196    isImageAttachment: function( attachment ) {
     
    209209     *
    210210     * @param {wp.media.model.Attachment} attachment
    211      * @return {Boolean}
     211     * @return {boolean}
    212212     */
    213213    canEmbed: function( attachment ) {
  • trunk/src/js/media/controllers/region.js

    r46800 r48650  
    1616 * @class
    1717 *
    18  * @param {object}        options          Options hash for the region.
     18 * @param {Object}        options          Options hash for the region.
    1919 * @param {string}        options.id       Unique identifier for the region.
    2020 * @param {Backbone.View} options.view     A parent view the region exists within.
  • trunk/src/js/media/models/attachments.js

    r48168 r48650  
    8888     *
    8989     * @param {Backbone.Model} model
    90      * @param {Boolean} query
     90     * @param {boolean} query
    9191     */
    9292    _changeQuery: function( model, query ) {
     
    148148     *
    149149     * @param {wp.media.model.Attachment} attachment
    150      * @return {Boolean}
     150     * @return {boolean}
    151151     */
    152152    validator: function( attachment ) {
     
    191191     *
    192192     * @param {wp.media.model.Attachments} attachments
    193      * @param {object} [options={}]
     193     * @param {Object} [options={}]
    194194     *
    195195     * @fires wp.media.model.Attachments#reset
     
    315315     * server persistence by itself.
    316316     *
    317      * @param {object} options
     317     * @param {Object} options
    318318     * @return {Promise}
    319319     */
     
    448448     * @param {Backbone.Model} b
    449449     * @param {Object} options
    450      * @return {Number} -1 if the first model should come before the second,
     450     * @return {number} -1 if the first model should come before the second,
    451451     *                   0 if they are of the same rank and
    452452     *                   1 if the first model should come after.
     
    502502         * @this wp.media.model.Attachments
    503503         *
    504          * @return {Boolean}
     504         * @return {boolean}
    505505         */
    506506        type: function( attachment ) {
     
    529529         * @this wp.media.model.Attachments
    530530         *
    531          * @return {Boolean}
     531         * @return {boolean}
    532532         */
    533533        uploadedTo: function( attachment ) {
     
    545545         * @this wp.media.model.Attachments
    546546         *
    547          * @return {Boolean}
     547         * @return {boolean}
    548548         */
    549549        status: function( attachment ) {
  • trunk/src/js/media/models/query.js

    r48110 r48650  
    2323Query = Attachments.extend(/** @lends wp.media.model.Query.prototype */{
    2424    /**
    25      * @param {array}  [models=[]]  Array of initial models to populate the collection.
    26      * @param {object} [options={}]
     25     * @param {Array}  [models=[]]  Array of initial models to populate the collection.
     26     * @param {Object} [options={}]
    2727     */
    2828    initialize: function( models, options ) {
     
    9595     * Fetch more attachments from the server for the collection.
    9696     *
    97      * @param {object} [options={}]
     97     * @param {Object} [options={}]
    9898     * @return {Promise}
    9999     */
     
    123123     * Overrides wp.media.model.Attachments.sync
    124124     *
    125      * @param {String} method
     125     * @param {string} method
    126126     * @param {Backbone.Model} model
    127127     * @param {Object} [options={}]
  • trunk/src/js/media/views/attachment.js

    r48110 r48650  
    287287    },
    288288    /**
    289      * @return {unresolved|Boolean}
     289     * @return {unresolved|boolean}
    290290     */
    291291    selected: function() {
  • trunk/src/js/media/views/focus-manager.js

    r47122 r48650  
    2020     * Initializes the Focus Manager.
    2121     *
    22      * @param {object} options The Focus Manager options.
     22     * @param {Object} options The Focus Manager options.
    2323     *
    2424     * @since 5.3.0
     
    3636     * @since 5.3.0
    3737     *
    38      * @param {object} event jQuery event object.
     38     * @param {Object} event jQuery event object.
    3939     *
    4040     * @return {void}
     
    5555     * @since 5.3.0
    5656     *
    57      * @return {object} A jQuery collection of tabbable elements.
     57     * @return {Object} A jQuery collection of tabbable elements.
    5858     */
    5959    getTabbables: function() {
     
    115115     * @since 5.2.3
    116116     *
    117      * @param {object} visibleElement The jQuery object representing the element that should not be hidden.
     117     * @param {Object} visibleElement The jQuery object representing the element that should not be hidden.
    118118     *
    119119     * @return {void}
     
    172172     * @since 5.2.3
    173173     *
    174      * @param {object} element The DOM element that should be checked.
     174     * @param {Object} element The DOM element that should be checked.
    175175     *
    176176     * @return {boolean} Whether the element should not be hidden from assistive technologies.
     
    219219     * @since 5.3.0
    220220     *
    221      * @param {object} event jQuery event object.
     221     * @param {Object} event jQuery event object.
    222222     *
    223223     * @return {void}
     
    243243     * @since 5.3.0
    244244     *
    245      * @param {object} event jQuery event object.
     245     * @param {Object} event jQuery event object.
    246246     *
    247247     * @return {void}
     
    279279     * @since 5.3.0
    280280     *
    281      * @param {object} event jQuery event object.
     281     * @param {Object} event jQuery event object.
    282282     *
    283283     * @return {void}
     
    330330     * @since 5.3.0
    331331     *
    332      * @param {object} tab The tab DOM element.
     332     * @param {Object} tab The tab DOM element.
    333333     *
    334334     * @return {void}
  • trunk/src/js/media/views/uploader/editor.js

    r48110 r48650  
    6565     * Check browser support for drag'n'drop.
    6666     *
    67      * @return {Boolean}
     67     * @return {boolean}
    6868     */
    6969    browserSupport: function() {
Note: See TracChangeset for help on using the changeset viewer.