diff --git a/Gruntfile.js b/Gruntfile.js index 2e09a71dd0456..9f34d13b57721 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,5 +1,4 @@ /* jshint node:true */ -/* eslint-env es6 */ /* globals Set */ var webpackConfig = require( './webpack.config' ); var installChanged = require( 'install-changed' ); diff --git a/src/js/_enqueues/admin/application-passwords.js b/src/js/_enqueues/admin/application-passwords.js index c79cdb8b4037f..2e6f2e82c1eed 100644 --- a/src/js/_enqueues/admin/application-passwords.js +++ b/src/js/_enqueues/admin/application-passwords.js @@ -2,6 +2,9 @@ * @output wp-admin/js/application-passwords.js */ +/** + * @param {JQueryStatic} $ The jQuery object. + */ ( function( $ ) { var $appPassSection = $( '#application-passwords-section' ), $newAppPassForm = $appPassSection.find( '.create-application-password' ), @@ -188,7 +191,7 @@ * * @param {string} message The message to display. * @param {string} type The notice type. Either 'success' or 'error'. - * @returns {jQuery} The notice element. + * @return {jQuery} The notice element. */ function addNotice( message, type ) { var $notice = $( '
' ) diff --git a/src/js/_enqueues/admin/comment.js b/src/js/_enqueues/admin/comment.js index b31f174bab5fe..d2ebafbcf4834 100644 --- a/src/js/_enqueues/admin/comment.js +++ b/src/js/_enqueues/admin/comment.js @@ -9,7 +9,7 @@ * * @since 2.5.0 * - * @param {jQuery} $ The jQuery object. + * @param {JQueryStatic} $ The jQuery object. */ jQuery( function($) { diff --git a/src/js/_enqueues/admin/common.js b/src/js/_enqueues/admin/common.js index c3d49310e8897..735a9aeeaabef 100644 --- a/src/js/_enqueues/admin/common.js +++ b/src/js/_enqueues/admin/common.js @@ -8,9 +8,9 @@ /** * Adds common WordPress functionality to the window. * - * @param {jQuery} $ jQuery object. - * @param {Object} window The window object. - * @param {mixed} undefined Unused. + * @param {JQueryStatic} $ The jQuery object. + * @param {Object} window The window object. + * @param {*} undefined Unused. */ ( function( $, window, undefined ) { var $document = $( document ), @@ -58,10 +58,10 @@ function deprecatedProperty( propName, version, replacement ) { * @since 5.6.0 Added the `version` parameter. * * @param {string} name The name of the object, i.e. commonL10n. - * @param {object} l10nObject The object to deprecate the properties on. + * @param {Object} l10nObject The object to deprecate the properties on. * @param {string} version The version of WordPress that deprecated the property. * - * @return {object} The object with all its properties deprecated. + * @return {Object} The object with all its properties deprecated. */ function deprecateL10nObject( name, l10nObject, version ) { var deprecatedObject = {}; @@ -476,8 +476,6 @@ window.columns = { * Gets the checked column toggles from the screen options. * * @since 3.0.0 - * - * @return {string} String containing the checked column names. */ useCheckboxesForHidden : function() { this.hidden = function(){ @@ -557,7 +555,7 @@ window.showNotice = { * * @since 2.7.0 * - * @param text The text to display in the message. + * @param {string} text The text to display in the message. */ note : function(text) { alert(text); @@ -1263,6 +1261,7 @@ $( function() { /** * Triggers the primary submit when then secondary submit is clicked. * + * @param {SubmitEvent} e The event object. * @since 5.7.0 * * @return {void} @@ -2245,6 +2244,8 @@ $( function( $ ) { * plugin icon images in the update plugins table. * * @since 6.4.0 + * + * @return {Object} Public methods. */ (function() { // Private variables and methods. diff --git a/src/js/_enqueues/admin/custom-background.js b/src/js/_enqueues/admin/custom-background.js index f83db00af03b4..d8ef84e618bc1 100644 --- a/src/js/_enqueues/admin/custom-background.js +++ b/src/js/_enqueues/admin/custom-background.js @@ -10,6 +10,8 @@ * @since 3.0.0 * * @requires jQuery + * + * @param {JQueryStatic} $ The jQuery object. */ (function($) { $( function() { diff --git a/src/js/_enqueues/admin/custom-header.js b/src/js/_enqueues/admin/custom-header.js index 367756ef8758b..40f9be4f35962 100644 --- a/src/js/_enqueues/admin/custom-header.js +++ b/src/js/_enqueues/admin/custom-header.js @@ -11,6 +11,8 @@ * * @deprecated 4.1.0 The page this is used on is never linked to from the UI. * Setting a custom header is completely handled by the Customizer. + * + * @param {JQueryStatic} $ The jQuery object. */ (function($) { var frame; diff --git a/src/js/_enqueues/admin/edit-comments.js b/src/js/_enqueues/admin/edit-comments.js index 78ee78de759ff..4320c8e00f0ea 100644 --- a/src/js/_enqueues/admin/edit-comments.js +++ b/src/js/_enqueues/admin/edit-comments.js @@ -1,14 +1,14 @@ +/* global adminCommentsSettings, thousandsSeparator, list_args, QTags, ajaxurl, wpAjax */ +/* global commentReply, theExtraList, theList, setCommentsList */ + /** * Handles updating and editing comments. - * - * @file This file contains functionality for the admin comments page. - * @since 2.1.0 * @output wp-admin/js/edit-comments.js */ -/* global adminCommentsSettings, thousandsSeparator, list_args, QTags, ajaxurl, wpAjax */ -/* global commentReply, theExtraList, theList, setCommentsList */ - +/** + * @param {JQueryStatic} $ The jQuery object. + */ (function($) { var getCount, updateCount, updateCountText, updatePending, updateApproved, updateHtmlTitle, updateDashboardText, updateInModerationText, adminTitle = document.title, diff --git a/src/js/_enqueues/admin/inline-edit-post.js b/src/js/_enqueues/admin/inline-edit-post.js index 6e6e3bef606ed..7f469137fc1bd 100644 --- a/src/js/_enqueues/admin/inline-edit-post.js +++ b/src/js/_enqueues/admin/inline-edit-post.js @@ -21,6 +21,9 @@ window.wp = window.wp || {}; * @property {string} type The type of inline editor. * @property {string} what The prefix before the post ID. * + * @param {JQueryStatic} $ The jQuery object. + * @param {wp} wp The WordPress global object. + * */ ( function( $, wp ) { @@ -188,6 +191,8 @@ window.wp = window.wp || {}; * @since 2.7.0 * * @memberof inlineEditPost + * + * @return {void|false} Returns false if no checkboxes are checked, otherwise does not return anything. */ setBulk : function(){ var te = '', type = this.type, c = true; diff --git a/src/js/_enqueues/admin/inline-edit-tax.js b/src/js/_enqueues/admin/inline-edit-tax.js index 86e3498cd1eac..620533455f6be 100644 --- a/src/js/_enqueues/admin/inline-edit-tax.js +++ b/src/js/_enqueues/admin/inline-edit-tax.js @@ -16,6 +16,9 @@ window.wp = window.wp || {}; * @property {string} type The type of inline edit we are currently on. * @property {string} what The type property with a hash prefixed and a dash * suffixed. + * + * @param {JQueryStatic} $ The jQuery object. + * @param {Object} wp The WordPress object. */ ( function( $, wp ) { diff --git a/src/js/_enqueues/admin/post.js b/src/js/_enqueues/admin/post.js index 445e79d8a6f05..2eac2f828397a 100644 --- a/src/js/_enqueues/admin/post.js +++ b/src/js/_enqueues/admin/post.js @@ -14,6 +14,9 @@ window.makeSlugeditClickable = window.editPermalink = function(){}; // Make sure the wp object exists. window.wp = window.wp || {}; +/** + * @param {JQueryStatic} $ The jQuery object. + */ ( function( $ ) { var titleHasFocus = false, __ = wp.i18n.__; @@ -254,6 +257,8 @@ window.wp = window.wp || {}; /** * Heartbeat refresh nonces. + * + * @param {JQueryStatic} $ The jQuery object. */ (function($) { var check, timeout; @@ -300,6 +305,8 @@ window.wp = window.wp || {}; /** * All post and postbox controls and functionality. + * + * @param {JQueryStatic} $ The jQuery object. */ jQuery( function($) { var stamp, visibility, $submitButtons, updateVisibility, updateText, @@ -620,11 +627,11 @@ jQuery( function($) { }); /** - * Before adding a new taxonomy, disable submit button. + * Disables the submit button before adding a new taxonomy. * * @param {Object} s Taxonomy object which will be added. * - * @return {Object} + * @return {Object} Taxonomy object with additional data to be sent to the server. */ catAddBefore = function( s ) { if ( !$('#new'+taxonomy).val() ) { @@ -1322,6 +1329,9 @@ jQuery( function($) { /** * TinyMCE word count display + * + * @param {JQueryStatic} $ The jQuery object. + * @param {wp.utils.WordCounter} counter The WordCounter object. */ ( function( $, counter ) { $( function() { diff --git a/src/js/_enqueues/admin/site-health.js b/src/js/_enqueues/admin/site-health.js index 57d5c9cbcf289..98aaedc427c0e 100644 --- a/src/js/_enqueues/admin/site-health.js +++ b/src/js/_enqueues/admin/site-health.js @@ -85,9 +85,9 @@ jQuery( function( $ ) { * * @since 5.6.0 * - * @param {Object} issue + * @param {Object} issue The issue data to validate. * - * @return {boolean} + * @return {boolean} True if the issue data is valid, false otherwise. */ function validateIssueData( issue ) { // Expected minimum format of a valid SiteHealth test response. @@ -137,6 +137,7 @@ jQuery( function( $ ) { * @since 5.2.0 * * @param {Object} issue The issue data. + * @return {void|boolean} True if the issue was appended, false otherwise. */ function appendIssue( issue ) { var template = wp.template( 'health-check-issue' ), @@ -346,6 +347,8 @@ jQuery( function( $ ) { /** * Add the details of a failed asynchronous test to the list of test results. * + * @param {string} url + * @param {string} description * @since 5.6.0 */ function addFailedSiteHealthCheckNotice( url, description ) { diff --git a/src/js/_enqueues/admin/site-icon.js b/src/js/_enqueues/admin/site-icon.js index a4f94797a5a48..59a098dc08aac 100644 --- a/src/js/_enqueues/admin/site-icon.js +++ b/src/js/_enqueues/admin/site-icon.js @@ -141,7 +141,7 @@ * * @since 6.5.0 * - * @param {array} attributes The attributes for the attachment. + * @param {Object} attributes The attributes for the attachment. */ function switchToUpdate( attributes ) { var i18nAppAlternativeString, i18nBrowserAlternativeString; diff --git a/src/js/_enqueues/admin/tags-suggest.js b/src/js/_enqueues/admin/tags-suggest.js index d439f06ef0de8..08bea1464bbbe 100644 --- a/src/js/_enqueues/admin/tags-suggest.js +++ b/src/js/_enqueues/admin/tags-suggest.js @@ -2,6 +2,8 @@ * Default settings for jQuery UI Autocomplete for use with non-hierarchical taxonomies. * * @output wp-admin/js/tags-suggest.js + * + * @param {JQueryStatic} $ The jQuery object. */ ( function( $ ) { var tempID = 0; diff --git a/src/js/_enqueues/admin/tags.js b/src/js/_enqueues/admin/tags.js index 88e38b6926309..8d449ca986863 100644 --- a/src/js/_enqueues/admin/tags.js +++ b/src/js/_enqueues/admin/tags.js @@ -9,6 +9,9 @@ /* global ajaxurl, wpAjax, showNotice, validateForm */ + /** + * @param {JQueryStatic} $ The jQuery object. + */ jQuery( function($) { var addingTerm = false; diff --git a/src/js/_enqueues/admin/user-profile.js b/src/js/_enqueues/admin/user-profile.js index 6a6be6745e357..c2bd1a78dc179 100644 --- a/src/js/_enqueues/admin/user-profile.js +++ b/src/js/_enqueues/admin/user-profile.js @@ -1,8 +1,12 @@ +/* global ajaxurl, pwsL10n, userProfileL10n, ClipboardJS */ + /** * @output wp-admin/js/user-profile.js */ -/* global ajaxurl, pwsL10n, userProfileL10n, ClipboardJS */ +/** + * @param {JQueryStatic} $ The jQuery object. + */ (function($) { var updateLock = false, isSubmitting = false, @@ -160,7 +164,7 @@ * * @param {jQuery Object} $this The button element: the message will be inserted * above this button - * @param {bool} success Whether the message is a success message. + * @param {boolean} success Whether the message is a success message. * @param {string} message The message to insert. */ function addInlineNotice( $this, success, message ) { @@ -400,7 +404,7 @@ * On macOS Safari and Firefox, the native warning is preferred, * so this function returns false to suppress custom warnings. * - * @param {KeyboardEvent} e The keydown event object. + * @param {KeyboardEvent} event The keydown event object. * * @return {boolean} True if Caps Lock is on, false otherwise. */ diff --git a/src/js/_enqueues/admin/widgets.js b/src/js/_enqueues/admin/widgets.js index e8fc42507d382..cbd8f8dd4a222 100644 --- a/src/js/_enqueues/admin/widgets.js +++ b/src/js/_enqueues/admin/widgets.js @@ -11,14 +11,14 @@ window.wpWidgets = { /** * A closed Sidebar that gets a Widget dragged over it. * - * @var {element|null} + * @member {jQuery|null} */ hoveredSidebar: null, /** * Lookup of which widgets have had change events triggered. * - * @var {object} + * @member {Object} */ dirtyWidgets: {}, @@ -751,7 +751,7 @@ $( function(){ wpWidgets.init(); } ); * @since 4.9.0 * @deprecated 5.5.0 * - * @type {object} + * @type {Object} */ wpWidgets.l10n = wpWidgets.l10n || { save: '', diff --git a/src/js/_enqueues/lib/accordion.js b/src/js/_enqueues/lib/accordion.js index 9b52b179b22a6..12daff74a0daf 100644 --- a/src/js/_enqueues/lib/accordion.js +++ b/src/js/_enqueues/lib/accordion.js @@ -29,6 +29,9 @@ * @output wp-admin/js/accordion.js */ +/** + * @param {JQueryStatic} $ The jQuery object. + */ ( function( $ ){ $( function () { diff --git a/src/js/_enqueues/lib/admin-bar.js b/src/js/_enqueues/lib/admin-bar.js index 619694db37f5c..3d6f4e3c8b94d 100644 --- a/src/js/_enqueues/lib/admin-bar.js +++ b/src/js/_enqueues/lib/admin-bar.js @@ -206,7 +206,7 @@ * @since 5.3.1 Use querySelector to clean up the function. * * @param {Event} event The click event. - * @return {boolean} Returns false to prevent default click behavior. + * @return {boolean|void} False to prevent default action. */ function clickShortlink( event ) { var wrapper = event.target.parentNode, @@ -397,6 +397,8 @@ * * @param {HTMLElement} el Element to get parent. * @param {string} selector CSS selector to match. + * + * @return {HTMLElement|null} The closest matching element or null if not found. */ function getClosest( el, selector ) { if ( ! window.Element.prototype.matches ) { diff --git a/src/js/_enqueues/lib/auth-check.js b/src/js/_enqueues/lib/auth-check.js index ff64573639a25..f01b14b35e386 100644 --- a/src/js/_enqueues/lib/auth-check.js +++ b/src/js/_enqueues/lib/auth-check.js @@ -4,6 +4,9 @@ * @output wp-includes/js/wp-auth-check.js */ +/** + * @param {JQueryStatic} $ The jQuery object. + */ ( function( $ ) { var wrap, tempHidden, diff --git a/src/js/_enqueues/lib/color-picker.js b/src/js/_enqueues/lib/color-picker.js index 600e0235b3bdb..51d68cbff4473 100644 --- a/src/js/_enqueues/lib/color-picker.js +++ b/src/js/_enqueues/lib/color-picker.js @@ -1,7 +1,13 @@ /** * @output wp-admin/js/color-picker.js + * + * @since 3.5.0 */ +/** + * @param {JQueryStatic} $ The jQuery object. + * @param {undefined} undef The undefined value. + */ ( function( $, undef ) { var ColorPicker, @@ -320,11 +326,11 @@ /** * Returns the iris object if no new color is provided. If a new color is provided, it sets the new color. * - * @param newColor {string|*} The new color to use. Can be undefined. + * @param {string|*} newColor The new color to use. Can be undefined. * * @since 3.5.0 * - * @return {string} The element's color. + * @return {string|void} The element's color. */ color: function( newColor ) { if ( newColor === undef ) { @@ -332,15 +338,16 @@ } this.element.iris( 'option', 'color', newColor ); }, + /** * Returns the iris object if no new default color is provided. * If a new default color is provided, it sets the new default color. * - * @param newDefaultColor {string|*} The new default color to use. Can be undefined. + * @param {string|*} newDefaultColor The new default color to use. Can be undefined. * * @since 3.5.0 * - * @return {boolean|string} The element's color. + * @return {string|void} The element's default color. */ defaultColor: function( newDefaultColor ) { if ( newDefaultColor === undef ) { diff --git a/src/js/_enqueues/lib/comment-reply.js b/src/js/_enqueues/lib/comment-reply.js index fabd579f5afc2..6ebc181551f79 100644 --- a/src/js/_enqueues/lib/comment-reply.js +++ b/src/js/_enqueues/lib/comment-reply.js @@ -127,7 +127,7 @@ window.addComment = ( function( window ) { * * @param {HTMLElement} context The parent DOM element to search for links. * - * @return {HTMLCollection|NodeList|Array} + * @return {HTMLCollection|NodeList} The collection of links. */ function replyLinks( context ) { var selectorClass = config.commentReplyClass; @@ -270,10 +270,10 @@ window.addComment = ( function( window ) { * * @since 5.1.0 * - * @param {HTMLElement} Element DOM element with the attribute. - * @param {string} Attribute the attribute to get. + * @param {HTMLElement} element DOM element with the attribute. + * @param {string} attribute The attribute to get. * - * @return {string} + * @return {string} The value of the attribute. */ function getDataAttribute( element, attribute ) { if ( supportsDataset ) { @@ -291,7 +291,9 @@ window.addComment = ( function( window ) { * * @since 5.1.0 * - * @param {HTMLElement} The requested element. + * @param {string} elementId The requested element. + * + * @return {HTMLElement} The element with the given ID. */ function getElementById( elementId ) { return document.getElementById( elementId ); @@ -309,6 +311,8 @@ window.addComment = ( function( window ) { * @param {string} respondId HTML ID of 'respond' element. * @param {string} postId Database ID of the post. * @param {string} replyTo Form heading content. + * + * @return {void|boolean} Returns false for backward compatibility with third party commenting systems hooking into this function. */ function moveForm( addBelowId, commentId, respondId, postId, replyTo ) { // Get elements based on their IDs. diff --git a/src/js/_enqueues/lib/cookies.js b/src/js/_enqueues/lib/cookies.js index 66d920affaa85..30a29d496a02e 100644 --- a/src/js/_enqueues/lib/cookies.js +++ b/src/js/_enqueues/lib/cookies.js @@ -40,6 +40,9 @@ window.wpCookies = { /** * Get a multi-values cookie. * Returns a JS object with the name: 'value' pairs. + * + * @param {string} name The name of the cookie. + * @return {Object} The cookie values as a JS object. */ getHash: function( name ) { var cookie = this.get( name ), values; @@ -59,6 +62,13 @@ window.wpCookies = { * Set a multi-values cookie. * * 'values_obj' is the JS object that is stored. It is encoded as URI in wpCookies.set(). + * + * @param {string} name The name of the cookie. + * @param {Object} values_obj The values to store in the cookie. + * @param {number|Date} [expires] Optional. Expiration time in seconds or a Date object. + * @param {string} [path] Optional. The path on the server in which the cookie will be available on. + * @param {string} [domain] Optional. The domain that the cookie is available to. + * @param {boolean} [secure] Optional. Whether the cookie should only be transmitted over a secure HTTPS connection. */ setHash: function( name, values_obj, expires, path, domain, secure ) { var str = ''; @@ -72,6 +82,8 @@ window.wpCookies = { /** * Get a cookie. + * @param {string} name The name of the cookie. + * @return {void|string} The cookie value. */ get: function( name ) { var e, b, @@ -107,7 +119,14 @@ window.wpCookies = { * Set a cookie. * * The 'expires' arg can be either a JS Date() object set to the expiration date (back-compat) - * or the number of seconds until expiration + * or the number of seconds until expiration. + * + * @param {string} name The name of the cookie. + * @param {string} value The value of the cookie. + * @param {number|Date} [expires] Optional. Expiration time in seconds or a Date object. + * @param {string} [path] Optional. The path on the server in which the cookie will be available on. + * @param {string} [domain] Optional. The domain that the cookie is available to. + * @param {boolean} [secure] Optional. Whether the cookie should only be transmitted over a secure HTTPS connection. */ set: function( name, value, expires, path, domain, secure ) { var d = new Date(); @@ -132,6 +151,11 @@ window.wpCookies = { * Remove a cookie. * * This is done by setting it to an empty value and setting the expiration time in the past. + * + * @param {string} name The name of the cookie. + * @param {string} [path] Optional. The path on the server in which the cookie will be available on. + * @param {string} [domain] Optional. The domain that the cookie is available to. + * @param {boolean} [secure] Optional. Whether the cookie should only be transmitted over a secure HTTPS connection. */ remove: function( name, path, domain, secure ) { this.set( name, '', -1000, path, domain, secure ); diff --git a/src/js/_enqueues/lib/emoji-loader.js b/src/js/_enqueues/lib/emoji-loader.js index 4882107670174..86963a2a3af24 100644 --- a/src/js/_enqueues/lib/emoji-loader.js +++ b/src/js/_enqueues/lib/emoji-loader.js @@ -2,14 +2,12 @@ * @output wp-includes/js/wp-emoji-loader.js */ -/* eslint-env es6 */ - // Note: This is loaded as a script module, so there is no need for an IIFE to prevent pollution of the global scope. /** * Emoji Settings as exported in PHP via _print_emoji_detection_script(). * @typedef WPEmojiSettings - * @type {object} + * @type {Object} * @property {?object} source * @property {?string} source.concatemoji * @property {?string} source.twemoji @@ -29,7 +27,7 @@ window._wpemojiSettings = settings; /** * Support tests. * @typedef SupportTests - * @type {object} + * @type {Object} * @property {?boolean} flag * @property {?boolean} emoji */ @@ -44,7 +42,7 @@ const tests = [ 'flag', 'emoji' ]; * * @private * - * @returns {boolean} + * @return {boolean} True if the browser supports offloading to a Worker. */ function supportsWorkerOffloading() { return ( @@ -58,7 +56,7 @@ function supportsWorkerOffloading() { /** * @typedef SessionSupportTests - * @type {object} + * @type {Object} * @property {number} timestamp * @property {SupportTests} supportTests */ @@ -70,7 +68,7 @@ function supportsWorkerOffloading() { * * @private * - * @returns {?SupportTests} Support tests, or null if not set or older than 1 week. + * @return {?SupportTests} Support tests, or null if not set or older than 1 week. */ function getSessionSupportTests() { try { diff --git a/src/js/_enqueues/lib/image-edit.js b/src/js/_enqueues/lib/image-edit.js index d1603051d7078..0431551aeb615 100644 --- a/src/js/_enqueues/lib/image-edit.js +++ b/src/js/_enqueues/lib/image-edit.js @@ -1,12 +1,13 @@ + /* global ajaxurl, confirm */ + /** * The functions necessary for editing images. * * @since 2.9.0 * @output wp-admin/js/image-edit.js + * + * @param {JQueryStatic} $ The jQuery object. */ - - /* global ajaxurl, confirm */ - (function($) { var __ = wp.i18n.__; @@ -23,6 +24,10 @@ /** * Enable crop tool. + * + * @param {number} postid The post ID. + * @param {string} nonce The nonce to verify the request. + * @param {HTMLElement} cropButton The crop button element. */ toggleCropTool: function( postid, nonce, cropButton ) { var img = $( '#image-preview-' + postid ), @@ -64,6 +69,10 @@ /** * Handle crop tool clicks. + * + * @param {number} postid The post ID. + * @param {string} nonce The nonce to verify the request. + * @param {HTMLElement} cropButton The crop button element. */ handleCropToolClick: function( postid, nonce, cropButton ) { @@ -269,8 +278,6 @@ * * @memberof imageEdit * - * @param {HTMLElement} el The activated control element. - * * @return {boolean} Always returns false. */ monitorPopup : function() { @@ -567,7 +574,7 @@ * * @param {number} postid The post ID. * @param {string} nonce The nonce to verify the request. - * @param {function} callback Function to execute when the image is loaded. + * @param {Function} callback Function to execute when the image is loaded. * * @return {void} */ @@ -1002,7 +1009,7 @@ * @param {Object} img jQuery object representing the image. * @param {Object} c The selection. * - * @return {Object} + * @return {void} */ onSelectEnd: function(img, c) { imageEdit.setCropSelection(postid, c); @@ -1047,7 +1054,7 @@ * @param {number} postid The post ID. * @param {Object} c The selection. * - * @return {boolean} + * @return {boolean|void} Returns false if the selection is invalid. */ setCropSelection : function(postid, c) { var sel, @@ -1197,7 +1204,7 @@ * @param {string} nonce The nonce. * @param {Object} t The target element. * - * @return {boolean} + * @return {boolean|void} Returns false if the rotate button is disabled. */ rotate : function(angle, postid, nonce, t) { if ( $(t).hasClass('disabled') ) { @@ -1224,7 +1231,7 @@ * @param {string} nonce The nonce. * @param {Object} t The target element. * - * @return {boolean} + * @return {boolean|void} Returns false if the flip button is disabled. */ flip : function (axis, postid, nonce, t) { if ( $(t).hasClass('disabled') ) { diff --git a/src/js/_enqueues/lib/list-revisions.js b/src/js/_enqueues/lib/list-revisions.js index db0485ef97a08..80ce2e909f287 100644 --- a/src/js/_enqueues/lib/list-revisions.js +++ b/src/js/_enqueues/lib/list-revisions.js @@ -1,4 +1,5 @@ /** + * @param {Window} w The global window object. * @output wp-includes/js/wp-list-revisions.js */