Make WordPress Core

Changeset 63598


Ignore:
Timestamp:
09/11/2026 06:29:08 AM (5 hours ago)
Author:
afercia
Message:

General: Enable the JSDoc rule require-param-description.

Enables the JSDoc rule require-param-description and fixes all the reported violations.
Part of the effort to improve JS inline documentation for 7.2.

Developed in https://github.com/WordPress/wordpress-develop/pull/13475

Props afercia, westonruter.
See #66033.

Location:
trunk
Files:
36 edited

Legend:

Unmodified
Added
Removed
  • trunk/.eslintrc-jsdoc.js

    r63577 r63598  
    5353                                enableFixer: false,
    5454                        } ],
     55                        'jsdoc/require-param-description': 'error',
    5556                        'jsdoc/require-param-name': 'error',
    5657                        'jsdoc/require-param-type': 'error',
  • trunk/src/js/_enqueues/admin/postbox.js

    r59988 r63598  
    247247                 * @memberof postboxes
    248248                 *
    249                  * @param {string} page The page we are currently on.
    250                  * @param {Object} [args]
    251                  * @param {Function} args.pbshow A callback that is called when a postbox opens.
    252                  * @param {Function} args.pbhide A callback that is called when a postbox closes.
     249                 * @param {string}   page          The page we are currently on.
     250                 * @param {Object}   [args]        Optional arguments for the postbox toggles.
     251                 * @param {Function} [args.pbshow] A callback that is called when a postbox opens.
     252                 * @param {Function} [args.pbhide] A callback that is called when a postbox closes.
    253253                 * @return {void}
    254254                 */
  • trunk/src/js/_enqueues/admin/site-health.js

    r63556 r63598  
    351351         * Add the details of a failed asynchronous test to the list of test results.
    352352         *
    353          * @param {string} url
    354          * @param {string} description
     353         * @param {string} url         The URL of the failed test.
     354         * @param {string} description The description of the failed test.
    355355         * @since 5.6.0
    356356         */
  • trunk/src/js/_enqueues/lib/embed-template.js

    r63556 r63598  
    197197                 * Detect clicks to external (_top) links.
    198198                 *
    199                  * @param {MouseEvent} event
     199                 * @param {MouseEvent} event The click event object.
    200200                 */
    201201                function linkClickHandler( event ) {
     
    238238         * Message handler.
    239239         *
    240          * @param {MessageEvent} event
     240         * @param {MessageEvent} event The message event object.
    241241         */
    242242        function onMessage( event ) {
  • trunk/src/js/_enqueues/lib/lists.js

    r63514 r63598  
    740740         * Registers event handlers to add, delete, and dim items.
    741741         *
    742          * @param {string} elementId
     742         * @param {string} elementId ID of the element to process, including leading #.
    743743         */
    744744        process: function( elementId ) {
     
    813813 * Initializes wpList object.
    814814 *
    815  * @param {Object}           settings
     815 * @param {Object}           settings             The settings for the wpList instance.
    816816 * @param {string}           settings.url         URL for ajax calls. Default: ajaxurl.
    817817 * @param {string}           settings.type        The HTTP method to use for Ajax requests. Default: 'POST'.
  • trunk/src/js/_enqueues/wp/api.js

    r63514 r63598  
    15471547         * Initialize the wp-api, optionally passing the API root.
    15481548         *
    1549          * @param {Object} [args]
     1549         * @param {Object} [args]               The arguments for initializing the wp-api.
    15501550         * @param {string} [args.nonce]         The nonce. Optional, defaults to wpApiSettings.nonce.
    15511551         * @param {string} [args.apiRoot]       The api root. Optional, defaults to wpApiSettings.root.
  • trunk/src/js/_enqueues/wp/dashboard.js

    r63407 r63598  
    704704                 * @since 5.5.2
    705705                 *
    706                  * @param {number} startTimestamp
     706                 * @param {number} startTimestamp The start timestamp of the event.
    707707                 *
    708708                 * @return {number} The offset from UTC in minutes, with the sign flipped to be more intuitive.
     
    717717                 * @since 5.5.2
    718718                 *
    719                  * @param {number} startTimestamp
     719                 * @param {number} startTimestamp The start timestamp of the event.
    720720                 *
    721721                 * @return {string} A short time zone name, like `PST`, or a string like `GMT+5` if the abbreviation can't be determined.
  • trunk/src/js/_enqueues/wp/heartbeat.js

    r63514 r63598  
    245245                                 * Handles pageshow event, specifically when page navigation is restored from back/forward cache.
    246246                                 *
    247                                  * @param {jQuery.Event} event
    248                                  * @param {PageTransitionEvent} event.originalEvent
     247                                 * @param {JQuery.Event}        event               The jQuery event object.
     248                                 * @param {PageTransitionEvent} event.originalEvent The original PageTransitionEvent object.
    249249                                 */
    250250                                function ( event ) {
  • trunk/src/js/_enqueues/wp/media/editor.js

    r63514 r63598  
    342342         * @class wp.media.collection
    343343         *
    344          * @param {Object} attributes
     344         * @param {Object} attributes The attributes for the media collection.
    345345         */
    346346        wp.media.collection = function(attributes) {
     
    787787                 *  subsequently be called upon it.
    788788                 *
    789                  * @param {string} id A slug used to identify the workflow.
    790                  * @param {Object} [options={}]
     789                 * @param {string} id           A slug used to identify the workflow.
     790                 * @param {Object} [options={}] The options for the media workflow.
    791791                 *
    792792                 * @this wp.media.editor
     
    10021002                         * Called when 'Insert From URL' source is not an image. Example: YouTube url.
    10031003                         *
    1004                          * @param {Object} embed
     1004                         * @param {Object} embed The embed object containing the link URL and link text.
    10051005                         * @return {Promise} A promise that resolves when the link has been sent to the editor.
    10061006                         */
     
    10191019                 *
    10201020                 * @param {string} [id=undefined] Optional. A slug used to identify the workflow.
    1021                  * @param {Object} [options={}]
     1021                 * @param {Object} [options={}]   The options for the media workflow.
    10221022                 *
    10231023                 * @this wp.media.editor
  • trunk/src/js/_enqueues/wp/media/models.js

    r63408 r63598  
    137137         * Scales a set of dimensions to fit within bounding dimensions.
    138138         *
    139          * @param {Object} dimensions
     139         * @param {Object} dimensions           The dimensions to scale.
     140         * @param {number} dimensions.width     The width to scale.
     141         * @param {number} dimensions.height    The height to scale.
     142         * @param {number} dimensions.maxWidth  The maxWidth to scale.
     143         * @param {number} dimensions.maxHeight The maxHeight to scale.
    140144         * @return {Object} The scaled dimensions.
    141145         */
     
    183187         * Useful for filenames.
    184188         *
    185          * @param {string} string
    186          * @param {number} [length=30]
    187          * @param {string} [replacement=…]
     189         * @param {string} string                 The string to truncate.
     190         * @param {number} [length=30]            The maximum length of the truncated string.
     191         * @param {string} [replacement=…] The string to use as the ellipsis replacement.
    188192         * @return {string} The string, unless length is greater than string.length.
    189193         */
     
    229233 * Shorthand for creating a new Attachments Query.
    230234 *
    231  * @param {Object} [props]
     235 * @param {Object} [props] The properties to filter the attachments by.
    232236 * @return {wp.media.model.Attachments} A collection of attachments matching the query.
    233237 */
  • trunk/src/js/_enqueues/wp/media/views.js

    r63408 r63598  
    4848 * Makes it easier to bind events using transitions.
    4949 *
    50  * @param {string} selector
    51  * @param {number} sensitivity
     50 * @param {string} selector    The CSS selector for the element to bind the transition event to.
     51 * @param {number} sensitivity The maximum time to wait for the transition event before resolving the promise.
    5252 * @return {Promise} A promise that resolves when the transition has completed.
    5353 */
  • trunk/src/js/_enqueues/wp/updates.js

    r63514 r63598  
    242242         * @since 4.6.0
    243243         *
    244          * @param {Object} data
     244         * @param {Object} data                 The data for the admin notice.
    245245         * @param {*}      [data.selector]      Optional. Selector of an element to be replaced with the admin notice.
    246246         * @param {string} [data.id]            Optional. Unique id that will be used as the notice's id attribute.
     
    335335         * @since 4.6.0
    336336         *
    337          * @param {Object} response
     337         * @param {Object} response             The response object from the Ajax request.
    338338         * @param {Array}  [response.debug]     Optional. Debug information.
    339339         * @param {string} [response.errorCode] Optional. Error code for an error that occurred.
     
    15951595         * @since 5.5.0 Auto-update "time to next update" text cleared.
    15961596         *
    1597          * @param {Object} response
     1597         * @param {Object} response            The response object from the Ajax request.
    15981598         * @param {string} response.slug       Slug of the theme to be updated.
    15991599         * @param {Object} response.theme      Updated theme.
     
    17101710         * @since 4.6.0
    17111711         *
    1712          * @param {Object}              args
     1712         * @param {Object}              args         The arguments for the theme installation request.
    17131713         * @param {string}              args.slug    Theme stylesheet.
    17141714         * @param {installThemeSuccess} args.success Optional. Success callback. Default: wp.updates.installThemeSuccess
     
    19021902         * @since 4.6.0
    19031903         *
    1904          * @param {Object}             args
     1904         * @param {Object}             args         The arguments for the theme deletion request.
    19051905         * @param {string}             args.slug    Theme stylesheet.
    19061906         * @param {deleteThemeSuccess} args.success Optional. Success callback. Default: wp.updates.deleteThemeSuccess
  • trunk/src/js/media/controllers/embed.js

    r63408 r63598  
    9090         * Try scanning the embed as an image to discover its dimensions.
    9191         *
    92          * @param {Object} attributes
     92         * @param {Object} attributes The attributes for the embed scan.
    9393         */
    9494        scanImage: function( attributes ) {
  • trunk/src/js/media/controllers/library.js

    r63516 r63598  
    159159         * @since 3.5.0
    160160         *
    161          * @param {wp.media.model.Attachment} attachment
     161         * @param {wp.media.model.Attachment} attachment The attachment for which to create display settings.
    162162         * @return {Backbone.Model} A model representing the display settings for the attachment.
    163163         */
     
    176176         * @since 3.6.0
    177177         *
    178          * @param {wp.media.model.Attachment} attachment
     178         * @param {wp.media.model.Attachment} attachment The attachment for which to get the default display settings.
    179179         * @return {Object} The default display settings for the attachment.
    180180         */
     
    197197         * @since 4.4.1
    198198         *
    199          * @param {wp.media.model.Attachment} attachment
     199         * @param {wp.media.model.Attachment} attachment The attachment to check.
    200200         * @return {boolean} True if the attachment is an image, false otherwise.
    201201         */
     
    214214         * @since 3.6.0
    215215         *
    216          * @param {wp.media.model.Attachment} attachment
     216         * @param {wp.media.model.Attachment} attachment The attachment to check.
    217217         * @return {boolean} True if the attachment can be embedded, false otherwise.
    218218         */
     
    263263         * @since 3.5.0
    264264         *
    265          * @param {wp.media.model.Attachment} attachment
     265         * @param {wp.media.model.Attachment} attachment The attachment that was uploaded.
    266266         */
    267267        uploading: function( attachment ) {
  • trunk/src/js/media/controllers/region.js

    r63408 r63598  
    3434         * @since 3.5.0
    3535         *
    36          * @param {string} mode
     36         * @param {string} mode The mode to activate on the region.
    3737         *
    3838         * @fires Region#activate
     
    7373         * @since 3.5.0
    7474         *
    75          * @param {string} mode
     75         * @param {string} mode The mode to render on the region.
    7676         *
    7777         * @fires Region#create
     
    132132         * @since 3.5.0
    133133         *
    134          * @param {Array|Object} views
    135          * @param {Object} [options={}]
     134         * @param {Array|Object} views        The views to set on the region.
     135         * @param {Object}       [options={}] Optional. Additional options for setting the views on the region.
    136136         * @return {wp.Backbone.Subviews} Subviews is returned to allow chaining.
    137137         */
     
    148148         * @since 3.5.0
    149149         *
    150          * @param {string} event
     150         * @param {string} event The event to trigger on the region.
    151151         * @return {undefined|wp.media.controller.Region} Returns itself to allow chaining.
    152152         */
  • trunk/src/js/media/controllers/state-machine.js

    r63516 r63598  
    3636         * @since 3.5.0
    3737         *
    38          * @param {string} id
     38         * @param {string} id The ID of the state to fetch. If omitted, the active state is returned.
    3939         * @return {wp.media.controller.State} Returns a State model from
    4040         *                                     the StateMachine collection.
     
    6161         * @since 3.5.0
    6262         *
    63          * @param {string} id
     63         * @param {string} id The ID of the state to set as active.
    6464         *
    6565         * @fires wp.media.controller.State#deactivate
  • trunk/src/js/media/models/attachment.js

    r63521 r63598  
    1515         * Overrides Backbone.Model.sync
    1616         *
    17          * @param {string} method
    18          * @param {wp.media.model.Attachment} model
    19          * @param {Object} [options={}]
     17         * @param {string}                    method       The method to be performed: 'read', 'update', or 'delete'.
     18         * @param {wp.media.model.Attachment} model        The attachment model being synced.
     19         * @param {Object}                    [options={}] Optional. Additional options for the sync operation.
    2020         *
    2121         * @return {jQuery.Promise} A jQuery Promise that is resolved or rejected based on the success of the sync operation.
     
    145145         * @static
    146146         *
    147          * @param {Object} attrs
     147         * @param {Object} attrs The attributes for the new attachment model.
    148148         * @return {wp.media.model.Attachment} The newly created attachment model.
    149149         */
     
    159159         *
    160160         * @static
    161          * @param {string} id A string used to identify a model.
    162          * @param {Backbone.Model|undefined} attachment
     161         * @param {string}                   id        A string used to identify a model.
     162         * @param {Backbone.Model|undefined} attachment The attachment model to retrieve or create.
    163163         * @return {wp.media.model.Attachment}
    164164         */
  • trunk/src/js/media/models/attachments.js

    r63521 r63598  
    3131         * Initializes the Attachments collection.
    3232         *
    33          * @param {Array} [models=[]] Array of models used to populate the collection.
    34          * @param {Object} [options={}]
     33         * @param {Array}  [models=[]]  Optional. Array of models used to populate the collection.
     34         * @param {Object} [options={}] Optional. Additional options for the collection.
    3535         */
    3636        initialize: function( models, options ) {
     
    8282         * @access private
    8383         *
    84          * @param {Backbone.Model} model
    85          * @param {string} orderby
     84         * @param {Backbone.Model} model   The model that triggered the change.
     85         * @param {string}         orderby The new orderby value.
    8686         */
    8787        _changeOrderby: function( model, orderby ) {
     
    102102         * @access private
    103103         *
    104          * @param {Backbone.Model} model
    105          * @param {boolean} query
     104         * @param {Backbone.Model} model The model that triggered the change.
     105         * @param {boolean}        query The new query value.
    106106         */
    107107        _changeQuery: function( model, query ) {
     
    118118         * @access private
    119119         *
    120          * @param {Backbone.Model} model
     120         * @param {Backbone.Model} model The model that triggered the change.
    121121         */
    122122        _changeFilteredProps: function( model ) {
     
    164164         * Checks whether an attachment is valid.
    165165         *
    166          * @param {wp.media.model.Attachment} attachment
     166         * @param {wp.media.model.Attachment} attachment The attachment to validate.
    167167         * @return {boolean} True if the attachment is valid, false otherwise.
    168168         */
     
    179179         * Adds or removes an attachment to the collection depending on its validity.
    180180         *
    181          * @param {wp.media.model.Attachment} attachment
    182          * @param {Object} options
     181         * @param {wp.media.model.Attachment} attachment The attachment to validate and potentially add or remove.
     182         * @param {Object}                    options    Additional options for the operation.
    183183         * @return {wp.media.model.Attachments} Returns itself to allow chaining.
    184184         */
     
    199199         * Adds or removes all attachments from another collection depending on each one's validity.
    200200         *
    201          * @param {wp.media.model.Attachments} attachments
    202          * @param {Object} [options={}]
     201         * @param {wp.media.model.Attachments} attachments  The attachments collection to validate against.
     202         * @param {Object}                     [options={}] Additional options for the operation.
    203203         *
    204204         * @fires wp.media.model.Attachments#reset
     
    282282         * @access private
    283283         *
    284          * @param {wp.media.model.Attachments} attachment
    285          * @param {wp.media.model.Attachments} attachments
    286          * @param {Object} options
     284         * @param {wp.media.model.Attachments} attachment  The attachment to validate.
     285         * @param {wp.media.model.Attachments} attachments The attachments collection the attachment belongs to.
     286         * @param {Object}                     options     Additional options for the operation.
    287287         *
    288288         * @return {wp.media.model.Attachments} Returns itself to allow chaining.
     
    302302         * @access private
    303303         *
    304          * @param {wp.media.model.Attachments} attachments
    305          * @param {Object} options
     304         * @param {wp.media.model.Attachments} attachments The attachments collection to validate against.
     305         * @param {Object}                     options     Additional options for the operation.
    306306         * @return {wp.media.model.Attachments} Returns itself to allow chaining.
    307307         */
     
    356356         * server persistence by itself.
    357357         *
    358          * @param {Object} options
     358         * @param {Object} options Additional options for the operation.
    359359         * @return {Promise} A promise that resolves when the request is complete.
    360360         */
     
    425425         *
    426426         * @param {Object|Array} response The raw response Object/Array.
    427          * @param {Object} xhr
     427         * @param {Object}       xhr      The XMLHttpRequest object.
    428428         * @return {Array} The array of model attributes to be added to the collection
    429429         */
     
    506506         * and its subclasses. @see wp.media.model.Attachments._changeOrderby().
    507507         *
    508          * @param {Backbone.Model} a
    509          * @param {Backbone.Model} b
    510          * @param {Object} options
     508         * @param {Backbone.Model} a       The first attachment model to compare.
     509         * @param {Backbone.Model} b       The second attachment model to compare.
     510         * @param {Object}         options Additional options for the comparison.
    511511         * @return {number} -1 if the first model should come before the second,
    512512         *                   0 if they are of the same rank and
     
    543543                 * to our server-side searching.
    544544                 *
    545                  * @param {wp.media.model.Attachment} attachment
     545                 * @param {wp.media.model.Attachment} attachment The attachment to filter based on the search query.
    546546                 *
    547547                 * @this wp.media.model.Attachments
     
    563563                 *
    564564                 * @static
    565                  * @param {wp.media.model.Attachment} attachment
     565                 * @param {wp.media.model.Attachment} attachment The attachment to filter based on its type.
    566566                 *
    567567                 * @this wp.media.model.Attachments
     
    592592                 *
    593593                 * @static
    594                  * @param {wp.media.model.Attachment} attachment
     594                 * @param {wp.media.model.Attachment} attachment The attachment to filter based on its uploadedTo property.
    595595                 *
    596596                 * @this wp.media.model.Attachments
     
    610610                 *
    611611                 * @static
    612                  * @param {wp.media.model.Attachment} attachment
     612                 * @param {wp.media.model.Attachment} attachment The attachment to filter based on its status property.
    613613                 *
    614614                 * @this wp.media.model.Attachments
  • trunk/src/js/media/models/query.js

    r63516 r63598  
    2626         *
    2727         * @param {Array}  [models=[]]  Array of initial models to populate the collection.
    28          * @param {Object} [options={}]
     28         * @param {Object} [options={}] Additional options for initializing the query.
    2929         */
    3030        initialize: function( models, options ) {
     
    9797         * Fetch more attachments from the server for the collection.
    9898         *
    99          * @param {Object} [options={}]
     99         * @param {Object} [options={}] Additional options for fetching more attachments.
    100100         * @return {Promise} A promise that resolves when the fetch is complete.
    101101         */
     
    125125         * Overrides wp.media.model.Attachments.sync
    126126         *
    127          * @param {string} method
    128          * @param {Backbone.Model} model
    129          * @param {Object} [options={}]
     127         * @param {string}         method       The sync method to be used (e.g., 'read', 'create', 'update', 'delete').
     128         * @param {Backbone.Model} model        The model to be synced.
     129         * @param {Object}         [options={}] Additional options for syncing the query.
    130130         * @return {Promise} A promise that resolves when the sync is complete.
    131131         */
     
    215215         * @function
    216216         *
    217          * @param {Object} [props]
    218          * @param {Object} [props.order]
    219          * @param {Object} [props.orderby]
    220          * @param {Object} [props.include]
    221          * @param {Object} [props.exclude]
    222          * @param {Object} [props.s]
    223          * @param {Object} [props.post_mime_type]
    224          * @param {Object} [props.posts_per_page]
    225          * @param {Object} [props.menu_order]
    226          * @param {Object} [props.post_parent]
    227          * @param {Object} [props.post_status]
    228          * @param {Object} [props.author]
    229          * @param {Object} [options]
     217         * @param {Object} [props]                The properties to initialize the query with.
     218         * @param {Object} [props.order]          The order in which to sort the query results.
     219         * @param {Object} [props.orderby]        The property by which to order the query results.
     220         * @param {Object} [props.include]        The IDs of attachments to include in the query.
     221         * @param {Object} [props.exclude]        The IDs of attachments to exclude from the query.
     222         * @param {Object} [props.s]              The search term to filter attachments by.
     223         * @param {Object} [props.post_mime_type] The MIME type to filter attachments by.
     224         * @param {Object} [props.posts_per_page] The number of attachments to retrieve per page.
     225         * @param {Object} [props.menu_order]     The menu order to filter attachments by.
     226         * @param {Object} [props.post_parent]    The parent post ID to filter attachments by.
     227         * @param {Object} [props.post_status]    The status to filter attachments by.
     228         * @param {Object} [props.author]         The author ID to filter attachments by.
     229         * @param {Object} [options]              Additional options for the query.
    230230         *
    231231         * @return {wp.media.model.Query} A new Attachments Query collection.
     
    241241                 * Creates and returns an Attachments Query collection given the properties.
    242242                 *
    243                  * @param {Object} [props]
    244                  * @param {Object} [options]
     243                 * @param {Object} [props]   The properties to initialize the query with.
     244                 * @param {Object} [options] Additional options for the query.
    245245                 * @return {Query} A new Attachments Query collection.
    246246                 */
  • trunk/src/js/media/models/selection.js

    r63408 r63598  
    1919         * it receives no parameters.
    2020         *
    21          * @param {Array} [models=[]] Array of models used to populate the collection.
    22          * @param {Object} [options={}]
     21         * @param {Array}  [models=[]] Array of models used to populate the collection.
     22         * @param {Object} [options={}] Additional options for the selection.
    2323         */
    2424        initialize: function( models, options ) {
     
    3636         * before adding a new attachment to it.
    3737         *
    38          * @param {Array} models
    39          * @param {Object} options
     38         * @param {Array}  models  The models to add to the selection.
     39         * @param {Object} options Additional options for adding the models.
    4040         * @return {wp.media.model.Attachment[]} The added attachments.
    4141         */
     
    5353         * Fired when toggling (clicking on) an attachment in the modal.
    5454         *
    55          * @param {undefined|boolean|wp.media.model.Attachment} model
     55         * @param {undefined|boolean|wp.media.model.Attachment} model The model to set as the single selection, or a boolean to clear it.
    5656         *
    5757         * @fires wp.media.model.Selection#selection:single
  • trunk/src/js/media/views/attachment-compat.js

    r63516 r63598  
    6363         * Prevents the default action of the event.
    6464         *
    65          * @param {Object} event
     65         * @param {JQuery.Event} event The jQuery event object associated with the action.
    6666         */
    6767        preventDefault: function( event ) {
     
    7171         * Saves the attachment compat data.
    7272         *
    73          * @param {Object} event
     73         * @param {JQuery.Event} event The jQuery event object associated with the action.
    7474         */
    7575        save: function( event ) {
  • trunk/src/js/media/views/attachment.js

    r63516 r63598  
    174174         * Toggles the selection state of the attachment.
    175175         *
    176          * @param {Object} event
     176         * @param {JQuery.Event} event The jQuery event object that triggered the selection toggle.
    177177         */
    178178        toggleSelectionHandler: function( event ) {
     
    230230         * Toggles the selection state of the attachment.
    231231         *
    232          * @param {Object} options
     232         * @param {Object} options The options for toggling the selection state of the attachment.
    233233         */
    234234        toggleSelection: function( options ) {
     
    323323         * Selects the model in the selection.
    324324         *
    325          * @param {Backbone.Model} model
    326          * @param {Backbone.Collection} collection
     325         * @param {Backbone.Model}      model      The model to select.
     326         * @param {Backbone.Collection} collection The collection containing the model.
    327327         */
    328328        select: function( model, collection ) {
     
    354354         * Deselects the model in the selection.
    355355         *
    356          * @param {Backbone.Model} model
    357          * @param {Backbone.Collection} collection
     356         * @param {Backbone.Model}      model      The model to deselect.
     357         * @param {Backbone.Collection} collection The collection containing the model.
    358358         */
    359359        deselect: function( model, collection ) {
     
    374374         * Updates the view to reflect whether the model is the single model in the selection.
    375375         *
    376          * @param {Backbone.Model} model
    377          * @param {Backbone.Collection} collection
     376         * @param {Backbone.Model}      model      The model to check for details.
     377         * @param {Backbone.Collection} collection The collection containing the model.
    378378         */
    379379        details: function( model, collection ) {
     
    391391         * Gets the image size object for the specified size.
    392392         *
    393          * @param {string} size
     393         * @param {string} size The desired image size.
    394394         * @return {Object} Returns an object containing the image size information.
    395395         */
     
    426426         * Update the model's setting with the value from the input.
    427427         *
    428          * @param {Object} event
     428         * @param {JQuery.Event} event The jQuery event object that triggered the setting update.
    429429         */
    430430        updateSetting: function( event ) {
     
    479479         * Updates the view's save status.
    480480         *
    481          * @param {string} status
     481         * @param {string} status The new save status to apply to the view.
    482482         * @return {wp.media.view.Attachment} Returns itself to allow chaining.
    483483         */
     
    523523         * Removes the model from the collection.
    524524         *
    525          * @param {Object} event
     525         * @param {JQuery.Event} event The jQuery event object that triggered the removal from the library.
    526526         */
    527527        removeFromLibrary: function( event ) {
     
    541541         * removes it.
    542542         *
    543          * @param {Object} event
     543         * @param {JQuery.Event} event The jQuery event object that triggered the selection toggle.
    544544         * @return {void}
    545545         */
     
    577577         * @instance
    578578         *
    579          * @param {Backbone.Model} model
    580          * @param {string} value
     579         * @param {Backbone.Model} model The model containing the caption.
     580         * @param {string}         value The new caption value.
    581581         * @return {wp.media.view.Attachment} Returns itself to allow chaining.
    582582         */
     
    588588         * @instance
    589589         *
    590          * @param {Backbone.Model} model
    591          * @param {string} value
     590         * @param {Backbone.Model} model The model containing the title.
     591         * @param {string}         value The new title value.
    592592         * @return {wp.media.view.Attachment} Returns itself to allow chaining.
    593593         */
     
    599599         * @instance
    600600         *
    601          * @param {Backbone.Model} model
    602          * @param {string} value
     601         * @param {Backbone.Model} model The model containing the artist.
     602         * @param {string}         value The new artist value.
    603603         * @return {wp.media.view.Attachment} Returns itself to allow chaining.
    604604         */
     
    610610         * @instance
    611611         *
    612          * @param {Backbone.Model} model
    613          * @param {string} value
     612         * @param {Backbone.Model} model The model containing the album.
     613         * @param {string}         value The new album value.
    614614         * @return {wp.media.view.Attachment} Returns itself to allow chaining.
    615615         */
  • trunk/src/js/media/views/attachments.js

    r50831 r63598  
    366366         * @since 3.5.0
    367367         *
    368          * @param {wp.media.model.Attachment} attachment
     368         * @param {wp.media.model.Attachment} attachment The attachment model for which to create a view.
    369369         *
    370370         * @return {wp.media.View} The created view.
  • trunk/src/js/media/views/button.js

    r63516 r63598  
    7575         * Handles the click event.
    7676         *
    77          * @param {Object} event
     77         * @param {JQuery.Event} event The jQuery event object for the click action.
    7878         */
    7979        click: function( event ) {
  • trunk/src/js/media/views/embed.js

    r63516 r63598  
    3333         * Sets the settings for the embed view.
    3434         *
    35          * @param {Object} view
     35         * @param {Object} view The view object to be set as the settings for the embed view.
    3636         */
    3737        settings: function( view ) {
  • trunk/src/js/media/views/frame.js

    r63409 r63598  
    9090         * Map activeMode collection events to the frame.
    9191         *
    92          * @param {Backbone.Model}      model
    93          * @param {Backbone.Collection} collection
    94          * @param {Object}              options
     92         * @param {Backbone.Model}      model      The model that triggered the event.
     93         * @param {Backbone.Collection} collection The collection to which the model belongs.
     94         * @param {Object}              options    The options object associated with the event.
    9595         */
    9696        triggerModeEvents: function( model, collection, options ) {
  • trunk/src/js/media/views/frame/post.js

    r63516 r63598  
    264264         * Handles the main menu for the frame.
    265265         *
    266          * @param {wp.Backbone.View} view
     266         * @param {wp.Backbone.View} view The menu view for the main menu.
    267267         */
    268268        mainMenu: function( view ) {
     
    295295         * Handles the gallery menu for the frame.
    296296         *
    297          * @param {wp.Backbone.View} view
     297         * @param {wp.Backbone.View} view The menu view for the gallery menu.
    298298         */
    299299        galleryMenu: function( view ) {
     
    327327         * Handles the playlist menu for the frame.
    328328         *
    329          * @param {wp.Backbone.View} view The menu view.
     329         * @param {wp.Backbone.View} view The menu view for the playlist menu.
    330330         */
    331331        playlistMenu: function( view ) {
  • trunk/src/js/media/views/frame/select.js

    r47122 r63598  
    109109         * Render callback for the router region in the `browse` mode.
    110110         *
    111          * @param {wp.media.view.Router} routerView
     111         * @param {wp.media.view.Router} routerView The router view for the `browse` mode.
    112112         */
    113113        browseRouter: function( routerView ) {
     
    127127         * Render callback for the content region in the `browse` mode.
    128128         *
    129          * @param {wp.media.controller.Region} contentRegion
     129         * @param {wp.media.controller.Region} contentRegion The content region for the `browse` mode.
    130130         */
    131131        browseContent: function( contentRegion ) {
     
    168168         * Toolbars
    169169         *
    170          * @param {Object} toolbar
    171          * @param {Object} [options={}]
     170         * @param {Object} toolbar      The toolbar object for the `select` mode.
     171         * @param {Object} [options={}] The options for creating the select toolbar view.
    172172         * @this wp.media.controller.Region
    173173         */
  • trunk/src/js/media/views/media-details.js

    r63521 r63598  
    6262         * @fires wp.media.view.MediaDetails#media:setting:remove
    6363         *
    64          * @param {Event} e
     64         * @param {JQuery.Event} e The jQuery event object.
    6565         */
    6666        removeSetting : function(e) {
     
    9595         * Adds a source to the media details view.
    9696         *
    97          * @param {JQuery.Event} e The event object.
     97         * @param {JQuery.Event} e The jQuery event object.
    9898         */
    9999        addSource : function( e ) {
     
    185185         * When multiple players in the DOM contain the same src, things get weird.
    186186         *
    187          * @param {HTMLElement} elem
     187         * @param {HTMLElement} elem The HTML element containing the media sources to be prepared.
    188188         * @return {HTMLElement} The prepared element.
    189189         */
  • trunk/src/js/media/views/media-frame.js

    r63516 r63598  
    161161         * Creates the title view.
    162162         *
    163          * @param {Object} title
     163         * @param {Object} title The title object for creating the title view.
    164164         * @this wp.media.controller.Region
    165165         */
     
    173173         * Creates the menu view.
    174174         *
    175          * @param {Object} menu
     175         * @param {Object} menu The menu object for creating the menu view.
    176176         * @this wp.media.controller.Region
    177177         */
     
    204204         * Creates the toolbar view.
    205205         *
    206          * @param {Object} toolbar
     206         * @param {Object} toolbar The toolbar object for creating the toolbar view.
    207207         * @this wp.media.controller.Region
    208208         */
     
    215215         * Creates the router view.
    216216         *
    217          * @param {Object} router
     217         * @param {Object} router The router object for creating the router view.
    218218         * @this wp.media.controller.Region
    219219         */
     
    233233         * Creates the iframe states.
    234234         *
    235          * @param {Object} options
     235         * @param {Object} options The options for creating the iframe states.
    236236         */
    237237        createIframeStates: function( options ) {
     
    272272         * Creates the iframe content view.
    273273         *
    274          * @param {Object} content
     274         * @param {Object} content The content object for creating the iframe content view.
    275275         * @this wp.media.controller.Region
    276276         */
  • trunk/src/js/media/views/menu.js

    r63516 r63598  
    5252         * Creates a view for the given options and id.
    5353         *
    54          * @param {Object} options
    55          * @param {string} id
     54         * @param {Object} options The options for creating the view.
     55         * @param {string} id      The id of the view to create.
    5656         * @return {wp.media.View} The view instance.
    5757         */
  • trunk/src/js/media/views/modal.js

    r63409 r63598  
    135135         * Closes the modal and triggers the close event.
    136136         *
    137          * @param {Object} options
     137         * @param {Object}  [options={}]     The options for closing the modal.
     138         * @param {boolean} [options.escape] Whether the modal is being closed due to the escape key.
    138139         * @return {wp.media.view.Modal} Returns itself to allow chaining.
    139140         */
     
    188189         * Handles the escape key press event to close the modal.
    189190         *
    190          * @param {Object} event
     191         * @param {JQuery.Event} event The jQuery event object.
    191192         */
    192193        escapeHandler: function( event ) {
     
    200201         * @since 6.7
    201202         *
    202          * @param {Object} event The keydown event object.
     203         * @param {JQuery.Event} event The jQuery event object.
    203204         */
    204205        selectHandler: function( event ) {
     
    233234         * forwards events to the modal's controller.
    234235         *
    235          * @param {string} id
     236         * @param {string} id The ID of the event to propagate.
    236237         * @return {wp.media.view.Modal} Returns itself to allow chaining.
    237238         */
     
    248249         * Handles keydown events within the modal.
    249250         *
    250          * @param {Object} event
     251         * @param {JQuery.Event} event The jQuery keydown event object.
    251252         */
    252253        keydown: function( event ) {
  • trunk/src/js/media/views/priority-list.js

    r63409 r63598  
    2525         * Adds a view to the list, sorted by its priority.
    2626         *
    27          * @param {string} id
    28          * @param {wp.media.View|Object} view
    29          * @param {Object} options
     27         * @param {string}               id      The ID of the view to set.
     28         * @param {wp.media.View|Object} view    The view to set.
     29         * @param {Object}               options The options for setting the view.
    3030         * @return {wp.media.view.PriorityList} Returns itself to allow chaining.
    3131         */
     
    7070         * Retrieves a view by its ID.
    7171         *
    72          * @param {string} id
     72         * @param {string} id The ID of the view to retrieve.
    7373         * @return {wp.media.View} Returns the view if found, otherwise undefined.
    7474         */
     
    7979         * Removes a view by its ID.
    8080         *
    81          * @param {string} id
     81         * @param {string} id The ID of the view to remove.
    8282         * @return {wp.media.view.PriorityList} Returns itself to allow chaining.
    8383         */
     
    9595         * Creates a view from an object of options.
    9696         *
    97          * @param {Object} options
     97         * @param {Object} options The options for creating the view.
    9898         * @return {wp.media.View} Returns the created view.
    9999         */
  • trunk/src/js/media/views/settings.js

    r63516 r63598  
    5353         * Updates the selected value for a setting.
    5454         *
    55          * @param {string} key
     55         * @param {string} key The key of the setting to update.
    5656         */
    5757        update: function( key ) {
     
    102102         * Updates the model when a setting is changed.
    103103         *
    104          * @param {Object} event
     104         * @param {JQuery.Event} event The jQuery event object associated with the setting change.
    105105         */
    106106        updateHandler: function( event ) {
  • trunk/src/js/media/views/toolbar.js

    r63516 r63598  
    8484         * Sets a view by its ID.
    8585         *
    86          * @param {string} id
    87          * @param {Backbone.View|Object} view
    88          * @param {Object} [options={}]
     86         * @param {string}               id           The ID of the view to set.
     87         * @param {Backbone.View|Object} view         The view to set.
     88         * @param {Object}               [options={}] The options for setting the view.
    8989         * @return {wp.media.view.Toolbar} Returns itself to allow chaining.
    9090         */
     
    122122         * Retrieves a view by its ID.
    123123         *
    124          * @param {string} id
     124         * @param {string} id The ID of the view to retrieve.
    125125         * @return {wp.media.view.Button} The view associated with the given ID, or undefined if no view is found.
    126126         */
     
    131131         * Unsets a view by its ID.
    132132         *
    133          * @param {string} id
    134          * @param {Object} options
     133         * @param {string} id           The ID of the view to unset.
     134         * @param {Object} [options={}] The options for unsetting the view.
    135135         * @return {wp.media.view.Toolbar} Returns itself to allow chaining.
    136136         */
  • trunk/src/js/media/views/uploader/status.js

    r63409 r63598  
    108108         * Escapes the filename to prevent XSS attacks.
    109109         *
    110          * @param {string} filename
     110         * @param {string} filename The name of the file to be escaped.
    111111         * @return {string} Escaped filename.
    112112         */
     
    117117         * Handles an error event from the uploader queue.
    118118         *
    119          * @param {Backbone.Model} error
     119         * @param {Backbone.Model} error The error model from the uploader queue.
    120120         * @return {void}
    121121         */
Note: See TracChangeset for help on using the changeset viewer.