Commit c554654a10 for wordpress.org
commit c554654a10a5ea8eaedb81da3f207bafbc93087e
Author: afercia <afercia@git.wordpress.org>
Date: Tue Sep 8 06:51:52 2026 +0000
General: Add missing descriptions to the Customize JavaScript docs.
Part of the effort to improve JS inline documentation for 7.2. Preparation for the introduction of the JSDoc rule jsdoc/require-description.
Developed in https://github.com/WordPress/wordpress-develop/pull/13424
Props afercia, westonruter.
See #66033.
Built from https://develop.svn.wordpress.org/trunk@63525
git-svn-id: http://core.svn.wordpress.org/trunk@62701 1a063a9b-81f0-0310-95a4-ce76da25c4cd
diff --git a/wp-admin/js/customize-controls.js b/wp-admin/js/customize-controls.js
index 9ff8036075..2a1818b8bb 100644
--- a/wp-admin/js/customize-controls.js
+++ b/wp-admin/js/customize-controls.js
@@ -5,6 +5,8 @@
/* global _wpCustomizeHeader, _wpCustomizeBackground, _wpMediaViewsL10n, MediaElementPlayer, console, confirm */
/**
+ * The WordPress Customizer controls API.
+ *
* @param {Object} wp The WordPress global object.
* @param {JQueryStatic} $ The jQuery object.
*/
@@ -1067,6 +1069,8 @@
},
/**
+ * Handles the ready state (when overridden).
+ *
* @since 4.1.0
*
* @abstract
@@ -1175,6 +1179,8 @@
},
/**
+ * Handles the toggle logic to transition the active state.
+ *
* @since 4.1.0
*
* @param {boolean} active The active state to transition to.
@@ -1438,6 +1444,8 @@
},
/**
+ * Initializes a section.
+ *
* @constructs wp.customize.Section
* @augments wp.customize~Container
*
@@ -2804,6 +2812,8 @@
containerType: 'panel',
/**
+ * Initializes a panel.
+ *
* @constructs wp.customize.Panel
* @augments wp.customize~Container
*
@@ -2864,6 +2874,8 @@
},
/**
+ * Attaches events to the panel.
+ *
* @since 4.1.0
*/
attachEvents: function () {
@@ -5196,6 +5208,8 @@
screenshotRendered: false,
/**
+ * Handles the control's ready state.
+ *
* @since 4.2.0
*/
ready: function() {
@@ -6558,6 +6572,8 @@
refreshBuffer: null, // Will get set to api.settings.timeouts.windowRefresh.
/**
+ * Initializes the previewer.
+ *
* @constructs wp.customize.Previewer
* @augments wp.customize.Messenger
*
diff --git a/wp-admin/js/customize-nav-menus.js b/wp-admin/js/customize-nav-menus.js
index c3affc7d40..c2fecd9232 100644
--- a/wp-admin/js/customize-nav-menus.js
+++ b/wp-admin/js/customize-nav-menus.js
@@ -5,6 +5,8 @@
/* global menus, _wpCustomizeNavMenusSettings, wpNavMenu, console */
/**
+ * The WordPress Customizer nav menus API.
+ *
* @param {Object} api The Customizer API.
* @param {Object} wp The WordPress global object.
* @param {JQueryStatic} $ The jQuery object.
@@ -910,11 +912,15 @@
}, 2000 ),
/**
+ * Adds the active field class for the section container.
+ *
* @deprecated Since 4.7.0 now that the nav_menu sections are responsible for toggling the classes on their own containers.
*/
checked: function() {},
/**
+ * Removes the active field class for the section container.
+ *
* @deprecated Since 4.7.0 now that the nav_menu sections are responsible for toggling the classes on their own containers.
*/
unchecked: function() {},
@@ -1132,7 +1138,7 @@
},
/**
- *
+ * Refreshes the list of theme locations.
*/
refreshAssignedLocations: function() {
var section = this,
@@ -1147,6 +1153,8 @@
},
/**
+ * Updates the section title to reflect the theme locations assigned to this menu.
+ *
* @param {string[]} themeLocationSlugs Theme location slugs.
*/
updateAssignedLocationsInSectionTitle: function( themeLocationSlugs ) {
@@ -3542,6 +3550,8 @@
};
/**
+ * Gets the setting ID for a given menu item ID.
+ *
* @alias wp.customize.Menus~menuItemIdToSettingId
*
* @param {string} menuItemId The ID of the menu item.
diff --git a/wp-admin/js/customize-widgets.js b/wp-admin/js/customize-widgets.js
index fc11364d45..5f8faf2970 100644
--- a/wp-admin/js/customize-widgets.js
+++ b/wp-admin/js/customize-widgets.js
@@ -5,6 +5,8 @@
/* global _wpCustomizeWidgetsSettings */
/**
+ * The WordPress Customizer widgets API.
+ *
* @param {Object} wp The WordPress global object.
* @param {JQueryStatic} $ The jQuery object.
*/
@@ -476,6 +478,8 @@
api.Widgets.formSyncHandlers = {
/**
+ * Handles the widget-synced event for RSS widgets.
+ *
* @param {JQuery.Event} e The widget-synced event.
* @param {JQuery} widget The widget root element.
* @param {string} newForm The HTML for the updated widget form.
@@ -1554,6 +1558,8 @@
},
/**
+ * Moves the widget up or down one position in the sidebar.
+ *
* @private
*
* @param {number} offset The number of positions to move the widget, either 1 or -1.
@@ -2362,6 +2368,8 @@
}
/**
+ * Parses a widget ID into its id_base and number components.
+ *
* @param {string} widgetId The widget ID to parse.
* @return {Object} Parsed widget ID with id_base and number properties.
*/
@@ -2384,6 +2392,8 @@
}
/**
+ * Returns the setting ID for a given widget ID.
+ *
* @param {string} widgetId The widget ID.
* @return {string} The setting ID for the widget.
*/
diff --git a/wp-includes/js/customize-base.js b/wp-includes/js/customize-base.js
index 2bea9c467d..2b694b9a02 100644
--- a/wp-includes/js/customize-base.js
+++ b/wp-includes/js/customize-base.js
@@ -6,6 +6,8 @@
window.wp = window.wp || {};
/**
+ * The WordPress Customizer API.
+ *
* @param {Object} wp The WordPress global object.
* @param {JQueryStatic} $ The jQuery object.
*/
diff --git a/wp-includes/js/customize-loader.js b/wp-includes/js/customize-loader.js
index b4aaa12b9e..152d5d48dc 100644
--- a/wp-includes/js/customize-loader.js
+++ b/wp-includes/js/customize-loader.js
@@ -13,6 +13,8 @@
window.wp = window.wp || {};
/**
+ * The WordPress Customizer loader API.
+ *
* @param {Object} wp The WordPress global object.
* @param {JQueryStatic} $ The jQuery object.
*/
diff --git a/wp-includes/js/customize-models.js b/wp-includes/js/customize-models.js
index b1dbd0b401..a56f035728 100644
--- a/wp-includes/js/customize-models.js
+++ b/wp-includes/js/customize-models.js
@@ -5,6 +5,8 @@
/* global _wpCustomizeHeader */
/**
+ * The WordPress Customizer models API.
+ *
* @param {JQueryStatic} $ The jQuery object.
* @param {Object} wp The WordPress global object.
*/
diff --git a/wp-includes/js/customize-preview.js b/wp-includes/js/customize-preview.js
index ceabf3e320..f1f83803ca 100644
--- a/wp-includes/js/customize-preview.js
+++ b/wp-includes/js/customize-preview.js
@@ -110,6 +110,8 @@
*/
api.Preview = api.Messenger.extend(/** @lends wp.customize.Preview.prototype */{
/**
+ * Initializes the previewer.
+ *
* @param {Object} params Parameters to configure the messenger.
* @param {Object} options Extend any instance parameter or method with this object.
*/
diff --git a/wp-includes/js/customize-views.js b/wp-includes/js/customize-views.js
index f18bbfe3d2..16b36d782e 100644
--- a/wp-includes/js/customize-views.js
+++ b/wp-includes/js/customize-views.js
@@ -3,6 +3,8 @@
*/
/**
+ * The WordPress Customizer views API.
+ *
* @param {JQueryStatic} $ The jQuery object.
* @param {Object} wp The WordPress global object.
* @param {_.UnderscoreStatic} _ The Underscore.js object.
diff --git a/wp-includes/version.php b/wp-includes/version.php
index 33f04d0613..d2c8d869b9 100644
--- a/wp-includes/version.php
+++ b/wp-includes/version.php
@@ -16,7 +16,7 @@
*
* @global string $wp_version
*/
-$wp_version = '7.2-alpha-63524';
+$wp_version = '7.2-alpha-63525';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.