Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* jshint node:true */
/* eslint-env es6 */
/* globals Set */
var webpackConfig = require( './webpack.config' );
var installChanged = require( 'install-changed' );
Expand Down
5 changes: 4 additions & 1 deletion src/js/_enqueues/admin/application-passwords.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' ),
Expand Down Expand Up @@ -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 = $( '<div></div>' )
Expand Down
2 changes: 1 addition & 1 deletion src/js/_enqueues/admin/comment.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
*
* @since 2.5.0
*
* @param {jQuery} $ The jQuery object.
* @param {JQueryStatic} $ The jQuery object.
*/
jQuery( function($) {

Expand Down
17 changes: 9 additions & 8 deletions src/js/_enqueues/admin/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ),
Expand Down Expand Up @@ -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 = {};
Expand Down Expand Up @@ -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(){
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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}
Expand Down Expand Up @@ -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.
Expand Down
2 changes: 2 additions & 0 deletions src/js/_enqueues/admin/custom-background.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
* @since 3.0.0
*
* @requires jQuery
*
* @param {JQueryStatic} $ The jQuery object.
*/
(function($) {
$( function() {
Expand Down
2 changes: 2 additions & 0 deletions src/js/_enqueues/admin/custom-header.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
12 changes: 6 additions & 6 deletions src/js/_enqueues/admin/edit-comments.js
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
5 changes: 5 additions & 0 deletions src/js/_enqueues/admin/inline-edit-post.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {

Expand Down Expand Up @@ -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;
Expand Down
3 changes: 3 additions & 0 deletions src/js/_enqueues/admin/inline-edit-tax.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {

Expand Down
14 changes: 12 additions & 2 deletions src/js/_enqueues/admin/post.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.__;
Expand Down Expand Up @@ -254,6 +257,8 @@ window.wp = window.wp || {};

/**
* Heartbeat refresh nonces.
*
* @param {JQueryStatic} $ The jQuery object.
*/
(function($) {
var check, timeout;
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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() ) {
Expand Down Expand Up @@ -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() {
Expand Down
7 changes: 5 additions & 2 deletions src/js/_enqueues/admin/site-health.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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' ),
Expand Down Expand Up @@ -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 ) {
Expand Down
2 changes: 1 addition & 1 deletion src/js/_enqueues/admin/site-icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions src/js/_enqueues/admin/tags-suggest.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 3 additions & 0 deletions src/js/_enqueues/admin/tags.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@

/* global ajaxurl, wpAjax, showNotice, validateForm */

/**
* @param {JQueryStatic} $ The jQuery object.
*/
jQuery( function($) {

var addingTerm = false;
Expand Down
10 changes: 7 additions & 3 deletions src/js/_enqueues/admin/user-profile.js
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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 ) {
Expand Down Expand Up @@ -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.
*/
Expand Down
6 changes: 3 additions & 3 deletions src/js/_enqueues/admin/widgets.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {},

Expand Down Expand Up @@ -751,7 +751,7 @@ $( function(){ wpWidgets.init(); } );
* @since 4.9.0
* @deprecated 5.5.0
*
* @type {object}
* @type {Object}
*/
wpWidgets.l10n = wpWidgets.l10n || {
save: '',
Expand Down
3 changes: 3 additions & 0 deletions src/js/_enqueues/lib/accordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
* @output wp-admin/js/accordion.js
*/

/**
* @param {JQueryStatic} $ The jQuery object.
*/
( function( $ ){

$( function () {
Expand Down
4 changes: 3 additions & 1 deletion src/js/_enqueues/lib/admin-bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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 ) {
Expand Down
3 changes: 3 additions & 0 deletions src/js/_enqueues/lib/auth-check.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@
* @output wp-includes/js/wp-auth-check.js
*/

/**
* @param {JQueryStatic} $ The jQuery object.
*/
( function( $ ) {
var wrap,
tempHidden,
Expand Down
Loading
Loading