summaryrefslogtreecommitdiffstatshomepage
path: root/src/js/_enqueues/wp/customize/controls.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js/_enqueues/wp/customize/controls.js')
-rw-r--r--src/js/_enqueues/wp/customize/controls.js228
1 files changed, 116 insertions, 112 deletions
diff --git a/src/js/_enqueues/wp/customize/controls.js b/src/js/_enqueues/wp/customize/controls.js
index d9b7978394..6c92362410 100644
--- a/src/js/_enqueues/wp/customize/controls.js
+++ b/src/js/_enqueues/wp/customize/controls.js
@@ -55,7 +55,7 @@
* @since 4.9.0
*
* @param {jQuery.Event} event - Event.
- * @returns {void}
+ * @return {void}
*/
handleEscape: function( event ) {
var notification = this;
@@ -98,7 +98,7 @@
* @param {jQuery} [options.container] - Container element for notifications. This can be injected later.
* @param {boolean} [options.alt] - Whether alternative style should be used when rendering notifications.
*
- * @returns {void}
+ * @return {void}
*/
initialize: function( options ) {
var collection = this;
@@ -137,7 +137,7 @@
*
* @param {string|wp.customize.Notification} notification - Notification object to add. Alternatively code may be supplied, and in that case the second notificationObject argument must be supplied.
* @param {wp.customize.Notification} [notificationObject] - Notification to add when first argument is the code string.
- * @returns {wp.customize.Notification} Added notification (or existing instance if it was already added).
+ * @return {wp.customize.Notification} Added notification (or existing instance if it was already added).
*/
add: function( notification, notificationObject ) {
var collection = this, code, instance;
@@ -211,7 +211,7 @@
* Render notifications area.
*
* @since 4.9.0
- * @returns {void}
+ * @return {void}
*/
render: function() {
var collection = this,
@@ -304,7 +304,7 @@
* @since 4.9.0
*
* @param {jQuery.Event} event - Event.
- * @returns {void}
+ * @return {void}
*/
constrainFocus: function constrainFocus( event ) {
var collection = this, focusableElements;
@@ -398,7 +398,7 @@
* @since 3.4.0
* @access public
*
- * @returns {void}
+ * @return {void}
*/
preview: function() {
var setting = this, transport;
@@ -419,7 +419,7 @@
* Find controls associated with this setting.
*
* @since 4.6.0
- * @returns {wp.customize.Control[]} Controls associated with setting.
+ * @return {wp.customize.Control[]} Controls associated with setting.
*/
findControls: function() {
var setting = this, controls = [];
@@ -497,7 +497,7 @@
*
* @param {object} [options] Options.
* @param {boolean} [options.unsaved=false] Whether only values not saved yet into a changeset will be returned (differential changes).
- * @returns {object} Dirty setting values.
+ * @return {object} Dirty setting values.
*/
api.dirtyValues = function dirtyValues( options ) {
var values = {};
@@ -535,7 +535,7 @@
* @param {boolean} [args.force=false] - Send request to update even when there are no changes to submit. This can be used to request the latest status of the changeset on the server.
* @param {string} [args.title] - Title to update in the changeset. Optional.
* @param {string} [args.date] - Date to update in the changeset. Optional.
- * @returns {jQuery.Promise} Promise resolving with the response data.
+ * @return {jQuery.Promise} Promise resolving with the response data.
*/
api.requestChangesetUpdate = function requestChangesetUpdate( changes, args ) {
var deferred, request, submittedChanges = {}, data, submittedArgs;
@@ -735,7 +735,7 @@
*
* @param {(wp.customize.Panel|wp.customize.Section|wp.customize.Control)} a
* @param {(wp.customize.Panel|wp.customize.Section|wp.customize.Control)} b
- * @returns {Number}
+ * @return {Number}
*/
api.utils.prioritySort = function ( a, b ) {
if ( a.priority() === b.priority() && typeof a.params.instanceNumber === 'number' && typeof b.params.instanceNumber === 'number' ) {
@@ -753,7 +753,7 @@
* @since 4.1.0
*
* @param {jQuery.Event} event
- * @returns {boolean}
+ * @return {boolean}
*/
api.utils.isKeydownButNotEnterEvent = function ( event ) {
return ( 'keydown' === event.type && 13 !== event.which );
@@ -768,7 +768,7 @@
*
* @param {Array|jQuery} listA
* @param {Array|jQuery} listB
- * @returns {boolean}
+ * @return {boolean}
*/
api.utils.areElementListsEqual = function ( listA, listB ) {
var equal = (
@@ -802,7 +802,7 @@
* is canceled. This option exists to accommodate compound buttons
* containing auxiliary UI, such as the Publish button augmented with a
* Settings button.
- * @returns {Function} An idempotent function that cancels the reminder.
+ * @return {Function} An idempotent function that cancels the reminder.
*/
api.utils.highlightButton = function highlightButton( button, options ) {
var animationClass = 'button-see-me',
@@ -849,7 +849,7 @@
*
* @since 4.9.0
*
- * @returns {int} Current timestamp.
+ * @return {int} Current timestamp.
*/
api.utils.getCurrentTimestamp = function getCurrentTimestamp() {
var currentDate, currentClientTimestamp, timestampDifferential;
@@ -893,7 +893,7 @@
*
* @ignore
*
- * @returns {string|null} Normalized `transitionend` event name or null if CSS transitions are not supported.
+ * @return {string|null} Normalized `transitionend` event name or null if CSS transitions are not supported.
*/
normalizedTransitionendEventName = (function () {
var el, transitions, prop;
@@ -1014,7 +1014,7 @@
* Get the element that will contain the notifications.
*
* @since 4.9.0
- * @returns {jQuery} Notification container element.
+ * @return {jQuery} Notification container element.
*/
getNotificationsContainerElement: function() {
var container = this;
@@ -1025,7 +1025,7 @@
* Set up notifications.
*
* @since 4.9.0
- * @returns {void}
+ * @return {void}
*/
setupNotifications: function() {
var container = this, renderNotifications;
@@ -1056,7 +1056,7 @@
*
* @param {String} parentType
* @param {String} childType
- * @returns {Array}
+ * @return {Array}
*/
_children: function ( parentType, childType ) {
var parent = this,
@@ -1154,7 +1154,7 @@
*
* @param {Boolean} active
* @param {Object} [params]
- * @returns {Boolean} False if state already applied.
+ * @return {Boolean} False if state already applied.
*/
_toggleActive: function ( active, params ) {
var self = this;
@@ -1173,7 +1173,7 @@
/**
* @param {Object} [params]
- * @returns {Boolean} False if already active.
+ * @return {Boolean} False if already active.
*/
activate: function ( params ) {
return this._toggleActive( true, params );
@@ -1181,7 +1181,7 @@
/**
* @param {Object} [params]
- * @returns {Boolean} False if already inactive.
+ * @return {Boolean} False if already inactive.
*/
deactivate: function ( params ) {
return this._toggleActive( false, params );
@@ -1201,7 +1201,7 @@
* @param {Boolean} expanded - The new state to apply.
* @param {Object} [params] - Object containing options for expand/collapse.
* @param {Function} [params.completeCallback] - Function to call when expansion/collapse is complete.
- * @returns {Boolean} False if state already applied or active state is false.
+ * @return {Boolean} False if state already applied or active state is false.
*/
_toggleExpanded: function( expanded, params ) {
var instance = this, previousCompleteCallback;
@@ -1238,7 +1238,7 @@
/**
* @param {Object} [params]
- * @returns {Boolean} False if already expanded or if inactive.
+ * @return {Boolean} False if already expanded or if inactive.
*/
expand: function ( params ) {
return this._toggleExpanded( true, params );
@@ -1246,7 +1246,7 @@
/**
* @param {Object} [params]
- * @returns {Boolean} False if already collapsed.
+ * @return {Boolean} False if already collapsed.
*/
collapse: function ( params ) {
return this._toggleExpanded( false, params );
@@ -1259,7 +1259,7 @@
* @private
*
* @param {function} completeCallback Function to be called after transition is completed.
- * @returns {void}
+ * @return {void}
*/
_animateChangeExpanded: function( completeCallback ) {
// Return if CSS transitions are not supported.
@@ -1362,7 +1362,7 @@
* @since 4.7.0
* @access public
*
- * @returns {jQuery} Detached content element.
+ * @return {jQuery} Detached content element.
*/
getContent: function() {
var construct = this,
@@ -1543,7 +1543,7 @@
*
* @since 4.1.0
*
- * @returns {Boolean}
+ * @return {Boolean}
*/
isContextuallyActive: function () {
var section = this,
@@ -1562,7 +1562,7 @@
*
* @since 4.1.0
*
- * @returns {Array}
+ * @return {Array}
*/
controls: function () {
return this._children( 'section', 'control' );
@@ -1696,7 +1696,7 @@
*
* @param {string} id - ID.
* @param {object} options - Options.
- * @returns {void}
+ * @return {void}
*/
initialize: function( id, options ) {
var section = this;
@@ -1745,7 +1745,7 @@
*
* @since 4.2.0
*
- * @returns {void}
+ * @return {void}
*/
ready: function() {
var section = this;
@@ -1797,7 +1797,7 @@
*
* @since 4.2.0
*
- * @returns {Boolean}
+ * @return {Boolean}
*/
isContextuallyActive: function () {
return this.active();
@@ -1808,7 +1808,7 @@
*
* @since 4.2.0
*
- * @returns {void}
+ * @return {void}
*/
attachEvents: function () {
var section = this, debounced;
@@ -1953,7 +1953,7 @@
* @param {Object} args
* @param {Boolean} args.unchanged
* @param {Function} args.completeCallback
- * @returns {void}
+ * @return {void}
*/
onChangeExpanded: function ( expanded, args ) {
@@ -2043,7 +2043,7 @@
*
* @since 4.9.0
*
- * @returns {jQuery}
+ * @return {jQuery}
*/
getContent: function() {
return this.container.find( '.control-section-content' );
@@ -2054,7 +2054,7 @@
*
* @since 4.9.0
*
- * @returns {void}
+ * @return {void}
*/
loadThemes: function() {
var section = this, params, page, request;
@@ -2165,7 +2165,7 @@
* @since 4.9.0
* @param {Array} themes - Array of theme data to create controls with.
* @param {integer} page - Page of results being loaded.
- * @returns {void}
+ * @return {void}
*/
loadControls: function( themes, page ) {
var newThemeControls = [],
@@ -2194,7 +2194,7 @@
* Determines whether more themes should be loaded, and loads them.
*
* @since 4.9.0
- * @returns {void}
+ * @return {void}
*/
loadMore: function() {
var section = this, container, bottom, threshold;
@@ -2216,7 +2216,7 @@
* @since 4.9.0
*
* @param {string} term - The raw search input value.
- * @returns {void}
+ * @return {void}
*/
filterSearch: function( term ) {
var count = 0,
@@ -2260,7 +2260,7 @@
* @since 4.9.0
*
* @param {wp.customize.ThemesSection} section - The current theme section, passed through the debouncer.
- * @returns {void}
+ * @return {void}
*/
checkTerm: function( section ) {
var newTerm;
@@ -2277,7 +2277,7 @@
*
* @since 4.9.0
*
- * @returns {void}
+ * @return {void}
*/
filtersChecked: function() {
var section = this,
@@ -2320,7 +2320,7 @@
*
* @param {string} newTerm - New term.
* @param {Array} newTags - New tags.
- * @returns {void}
+ * @return {void}
*/
initializeNewQuery: function( newTerm, newTags ) {
var section = this;
@@ -2353,7 +2353,7 @@
*
* @since 4.2.0
*
- * @returns {void}
+ * @return {void}
*/
renderScreenshots: function() {
var section = this;
@@ -2407,7 +2407,7 @@
*
* @since 4.9.0
*
- * @returns {int} Visible count.
+ * @return {int} Visible count.
*/
getVisibleCount: function() {
return this.contentContainer.find( 'li.customize-control:visible' ).length;
@@ -2418,7 +2418,7 @@
*
* @since 4.9.0
*
- * @returns {void}
+ * @return {void}
*/
updateCount: function( count ) {
var section = this, countEl, displayed;
@@ -2448,7 +2448,7 @@
*
* @since 4.2.0
*
- * @returns {void}
+ * @return {void}
*/
nextTheme: function () {
var section = this;
@@ -2464,7 +2464,7 @@
*
* @since 4.2.0
*
- * @returns {wp.customize.ThemeControl|boolean} Next theme.
+ * @return {wp.customize.ThemeControl|boolean} Next theme.
*/
getNextTheme: function () {
var section = this, control, nextControl, sectionControls, i;
@@ -2486,7 +2486,7 @@
* Advance the modal to the previous theme.
*
* @since 4.2.0
- * @returns {void}
+ * @return {void}
*/
previousTheme: function () {
var section = this;
@@ -2501,7 +2501,7 @@
* Get the previous theme model.
*
* @since 4.2.0
- * @returns {wp.customize.ThemeControl|boolean} Previous theme.
+ * @return {wp.customize.ThemeControl|boolean} Previous theme.
*/
getPreviousTheme: function () {
var section = this, control, nextControl, sectionControls, i;
@@ -2524,7 +2524,7 @@
*
* @since 4.2.0
*
- * @returns {void}
+ * @return {void}
*/
updateLimits: function () {
if ( ! this.getNextTheme() ) {
@@ -2543,7 +2543,7 @@
*
* @deprecated
* @param {string} themeId Theme ID.
- * @returns {jQuery.promise} Promise.
+ * @return {jQuery.promise} Promise.
*/
loadThemePreview: function( themeId ) {
return api.ThemesPanel.prototype.loadThemePreview.call( this, themeId );
@@ -2556,7 +2556,7 @@
*
* @param {object} theme - Theme.
* @param {Function} [callback] - Callback once the details have been shown.
- * @returns {void}
+ * @return {void}
*/
showDetails: function ( theme, callback ) {
var section = this, panel = api.panel( 'themes' );
@@ -2591,7 +2591,7 @@
*
* @since 4.2.0
*
- * @returns {void}
+ * @return {void}
*/
closeDetails: function () {
var section = this;
@@ -2606,7 +2606,7 @@
* @since 4.2.0
*
* @param {jQuery} el - Element to contain focus.
- * @returns {void}
+ * @return {void}
*/
containFocus: function( el ) {
var tabbables;
@@ -2647,7 +2647,7 @@
*
* @since 4.9.0
*
- * @returns {void}
+ * @return {void}
*/
initialize: function() {
var section = this;
@@ -2870,7 +2870,7 @@
*
* @since 4.1.0
*
- * @returns {Array}
+ * @return {Array}
*/
sections: function () {
return this._children( 'panel', 'section' );
@@ -2881,7 +2881,7 @@
*
* @since 4.1.0
*
- * @returns {boolean} Whether contextually active.
+ * @return {boolean} Whether contextually active.
*/
isContextuallyActive: function () {
var panel = this,
@@ -2904,7 +2904,7 @@
* @param {Object} args
* @param {Boolean} args.unchanged
* @param {Function} args.completeCallback
- * @returns {void}
+ * @return {void}
*/
onChangeExpanded: function ( expanded, args ) {
@@ -3032,7 +3032,7 @@
*
* @param {string} id - The ID for the panel.
* @param {object} options - Options.
- * @returns {void}
+ * @return {void}
*/
initialize: function( id, options ) {
var panel = this;
@@ -3046,7 +3046,7 @@
* @since 4.9.0
*
* @param {string} [slug] - Theme slug.
- * @returns {boolean} Whether the theme can be switched to.
+ * @return {boolean} Whether the theme can be switched to.
*/
canSwitchTheme: function canSwitchTheme( slug ) {
if ( slug && slug === api.settings.theme.stylesheet ) {
@@ -3059,7 +3059,7 @@
* Attach events.
*
* @since 4.9.0
- * @returns {void}
+ * @return {void}
*/
attachEvents: function() {
var panel = this;
@@ -3132,7 +3132,7 @@
* @param {Object} args - Args.
* @param {Boolean} args.unchanged - Whether or not the state changed.
* @param {Function} args.completeCallback - Callback to execute when the animation completes.
- * @returns {void}
+ * @return {void}
*/
onChangeExpanded: function( expanded, args ) {
var panel = this, overlay, sections, hasExpandedSection = false;
@@ -3184,7 +3184,7 @@
* @since 4.9.0
*
* @param {jQuery.Event} event - Event.
- * @returns {jQuery.promise} Promise.
+ * @return {jQuery.promise} Promise.
*/
installTheme: function( event ) {
var panel = this, preview, onInstallSuccess, slug = $( event.target ).data( 'slug' ), deferred = $.Deferred(), request;
@@ -3289,7 +3289,7 @@
* @since 4.9.0
*
* @param {string} themeId Theme ID.
- * @returns {jQuery.promise} Promise.
+ * @return {jQuery.promise} Promise.
*/
loadThemePreview: function( themeId ) {
var panel = this, deferred = $.Deferred(), onceProcessingComplete, urlParser, queryParams;
@@ -3365,7 +3365,7 @@
* @since 4.9.0
*
* @param {jQuery.Event} event - Event.
- * @returns {void}
+ * @return {void}
*/
updateTheme: function( event ) {
wp.updates.maybeRequestFilesystemCredentials( event );
@@ -3395,7 +3395,7 @@
* @since 4.9.0
*
* @param {jQuery.Event} event - Event.
- * @returns {void}
+ * @return {void}
*/
deleteTheme: function( event ) {
var theme, section;
@@ -3492,7 +3492,7 @@
* @param {string} options.description - Description.
* @param {number} [options.instanceNumber] - Order in which this instance was created in relation to other instances.
* @param {object} [options.params] - Deprecated wrapper for the above properties.
- * @returns {void}
+ * @return {void}
*/
initialize: function( id, options ) {
var control = this, deferredSettingIds = [], settings, gatherSettings;
@@ -3633,7 +3633,7 @@
* @since 4.7.0
* @access public
*
- * @returns {void}
+ * @return {void}
*/
linkElements: function () {
var control = this, nodes, radios, element;
@@ -3708,7 +3708,7 @@
/**
* Triggered when the control's markup has been injected into the DOM.
*
- * @returns {void}
+ * @return {void}
*/
ready: function() {
var control = this, newItem;
@@ -3739,7 +3739,7 @@
* including special handling for nav menu items and widgets.
*
* @since 4.6.0
- * @returns {jQuery} Setting validation message element.
+ * @return {jQuery} Setting validation message element.
*/
getNotificationsContainerElement: function() {
var control = this, controlTitle, notificationsContainer;
@@ -3770,7 +3770,7 @@
* Set up notifications.
*
* @since 4.9.0
- * @returns {void}
+ * @return {void}
*/
setupNotifications: function() {
var control = this, renderNotificationsIfVisible, onSectionAssigned;
@@ -4047,7 +4047,7 @@
*
* @since 4.7.0
* @access private
- * @returns {void}
+ * @return {void}
*/
addNewPage: function () {
var control = this, promise, toggle, container, input, title, select;
@@ -4570,7 +4570,7 @@
*
* @param {wp.media.model.Attachment} attachment
* @param {wp.media.controller.Cropper} controller
- * @returns {Object} Options
+ * @return {Object} Options
*/
calculateImageSelectOptions: function( attachment, controller ) {
var control = controller.get( 'control' ),
@@ -4853,7 +4853,7 @@
*
* @since 4.2.0
*
- * @returns {Object} Options
+ * @return {Object} Options
*/
getInitialHeaderImage: function() {
if ( ! api.get().header_image || ! api.get().header_image_data || _.contains( [ 'remove-header', 'random-default-image', 'random-uploaded-image' ], api.get().header_image ) ) {
@@ -4886,7 +4886,7 @@
*
* @param {wp.media.model.Attachment} attachment
* @param {wp.media.controller.Cropper} controller
- * @returns {Object} Options
+ * @return {Object} Options
*/
calculateImageSelectOptions: function(attachment, controller) {
var xInit = parseInt(_wpCustomizeHeader.data.width, 10),
@@ -5155,7 +5155,7 @@
*
* @since 4.2.0
* @param {Array} terms - An array of terms to search for.
- * @returns {boolean} Whether a theme control was activated or not.
+ * @return {boolean} Whether a theme control was activated or not.
*/
filter: function( terms ) {
var control = this,
@@ -5207,7 +5207,7 @@
*
* @since 4.9.0
*
- * @returns {void}
+ * @return {void}
*/
rerenderAsInstalled: function( installed ) {
var control = this, section;
@@ -5238,7 +5238,7 @@
* @since 4.9.0
* @param {string} id - Unique identifier for the control instance.
* @param {object} options - Options hash for the control instance.
- * @returns {void}
+ * @return {void}
*/
initialize: function( id, options ) {
var control = this;
@@ -5273,7 +5273,7 @@
* Initialize the editor when the containing section is ready and expanded.
*
* @since 4.9.0
- * @returns {void}
+ * @return {void}
*/
ready: function() {
var control = this;
@@ -5305,7 +5305,7 @@
* Initialize editor.
*
* @since 4.9.0
- * @returns {void}
+ * @return {void}
*/
initEditor: function() {
var control = this, element, editorSettings = false;
@@ -5356,7 +5356,7 @@
* @since 4.9.0
* @param {Object} [params] - Focus params.
* @param {Function} [params.completeCallback] - Function to call when expansion is complete.
- * @returns {void}
+ * @return {void}
*/
focus: function( params ) {
var control = this, extendedParams = _.extend( {}, params ), originalCompleteCallback;
@@ -5377,7 +5377,7 @@
*
* @since 4.9.0
* @param {object} codeEditorSettings - Code editor settings.
- * @returns {void}
+ * @return {void}
*/
initSyntaxHighlightingEditor: function( codeEditorSettings ) {
var control = this, $textarea = control.container.find( 'textarea' ), settings, suspendEditorUpdate = false;
@@ -5436,7 +5436,7 @@
* Handle tabbing to the field after the editor.
*
* @since 4.9.0
- * @returns {void}
+ * @return {void}
*/
onTabNext: function onTabNext() {
var control = this, controls, controlIndex, section;
@@ -5454,7 +5454,7 @@
* Handle tabbing to the field before the editor.
*
* @since 4.9.0
- * @returns {void}
+ * @return {void}
*/
onTabPrevious: function onTabPrevious() {
var control = this, controls, controlIndex, section;
@@ -5473,7 +5473,7 @@
*
* @since 4.9.0
* @param {Array} errorAnnotations - Error annotations.
- * @returns {void}
+ * @return {void}
*/
onUpdateErrorNotice: function onUpdateErrorNotice( errorAnnotations ) {
var control = this, message;
@@ -5496,7 +5496,7 @@
* Initialize plain-textarea editor when syntax highlighting is disabled.
*
* @since 4.9.0
- * @returns {void}
+ * @return {void}
*/
initPlainTextareaEditor: function() {
var control = this, $textarea = control.container.find( 'textarea' ), textarea = $textarea[0];
@@ -5556,7 +5556,7 @@
* Initialize behaviors.
*
* @since 4.9.0
- * @returns {void}
+ * @return {void}
*/
ready: function ready() {
var control = this;
@@ -5618,7 +5618,7 @@
* @since 4.9.0
*
* @param {string} datetime - Date/Time string. Accepts Y-m-d[ H:i[:s]] format.
- * @returns {object|null} Returns object containing date components or null if parse error.
+ * @return {object|null} Returns object containing date components or null if parse error.
*/
parseDateTime: function parseDateTime( datetime ) {
var control = this, matches, date, midDayHour = 12;
@@ -5733,7 +5733,7 @@
* Populate setting value from the inputs.
*
* @since 4.9.0
- * @returns {boolean} If setting updated.
+ * @return {boolean} If setting updated.
*/
populateSetting: function populateSetting() {
var control = this, date;
@@ -5794,7 +5794,7 @@
* Check if the date is in the future.
*
* @since 4.9.0
- * @returns {boolean} True if future date.
+ * @return {boolean} True if future date.
*/
isFutureDate: function isFutureDate() {
var control = this;
@@ -5807,7 +5807,7 @@
* @since 4.9.0
* @param {string} hourInTwelveHourFormat - Hour in twelve hour format.
* @param {string} meridian - Either 'am' or 'pm'.
- * @returns {string} Hour in twenty four hour format.
+ * @return {string} Hour in twenty four hour format.
*/
convertHourToTwentyFourHourFormat: function convertHour( hourInTwelveHourFormat, meridian ) {
var hourInTwentyFourHourFormat, hour, midDayHour = 12;
@@ -5832,7 +5832,7 @@
* Populates date inputs in date fields.
*
* @since 4.9.0
- * @returns {boolean} Whether the inputs were populated.
+ * @return {boolean} Whether the inputs were populated.
*/
populateDateInputs: function populateDateInputs() {
var control = this, parsed;
@@ -5914,7 +5914,7 @@
* Initialize behaviors.
*
* @since 4.9.0
- * @returns {void}
+ * @return {void}
*/
ready: function ready() {
var control = this, element, component, node, url, input, button;
@@ -6042,7 +6042,8 @@
* @type {Function}
* @param {...string} ids - One or more ids for controls to obtain.
* @param {deferredControlsCallback} [callback] - Function called when all supplied controls exist.
- * @returns {wp.customize.Control|undefined|jQuery.promise} Control instance or undefined (if function called with one id param), or promise resolving to requested controls.
+ * @return {wp.customize.Control|undefined|jQuery.promise} Control instance or undefined (if function called with one id param),
+ * or promise resolving to requested controls.
*
* @example <caption>Loop over all registered controls.</caption>
* wp.customize.control.each( function( control ) { ... } );
@@ -6103,7 +6104,8 @@
* @type {Function}
* @param {...string} ids - One or more ids for sections to obtain.
* @param {deferredSectionsCallback} [callback] - Function called when all supplied sections exist.
- * @returns {wp.customize.Section|undefined|jQuery.promise} Section instance or undefined (if function called with one id param), or promise resolving to requested sections.
+ * @return {wp.customize.Section|undefined|jQuery.promise} Section instance or undefined (if function called with one id param),
+ * or promise resolving to requested sections.
*
* @example <caption>Loop over all registered sections.</caption>
* wp.customize.section.each( function( section ) { ... } )
@@ -6137,7 +6139,8 @@
* @type {Function}
* @param {...string} ids - One or more ids for panels to obtain.
* @param {deferredPanelsCallback} [callback] - Function called when all supplied panels exist.
- * @returns {wp.customize.Panel|undefined|jQuery.promise} Panel instance or undefined (if function called with one id param), or promise resolving to requested panels.
+ * @return {wp.customize.Panel|undefined|jQuery.promise} Panel instance or undefined (if function called with one id param),
+ * or promise resolving to requested panels.
*
* @example <caption>Loop over all registered panels.</caption>
* wp.customize.panel.each( function( panel ) { ... } )
@@ -6171,7 +6174,8 @@
* @type {Function}
* @param {...string} codes - One or more codes for notifications to obtain.
* @param {deferredNotificationsCallback} [callback] - Function called when all supplied notifications exist.
- * @returns {wp.customize.Notification|undefined|jQuery.promise} notification instance or undefined (if function called with one code param), or promise resolving to requested notifications.
+ * @return {wp.customize.Notification|undefined|jQuery.promise} Notification instance or undefined (if function called with one code param),
+ * or promise resolving to requested notifications.
*
* @example <caption>Check if existing notification</caption>
* exists = wp.customize.notifications.has( 'a_new_day_arrived' );
@@ -6600,7 +6604,7 @@
* @param {object} data.activePanels - Active panels.
* @param {object} data.activeSections Active sections.
* @param {object} data.activeControls Active controls.
- * @returns {void}
+ * @return {void}
*/
ready: function( data ) {
var previewer = this, synced = {}, constructs;
@@ -6670,7 +6674,7 @@
* @since 4.7.0
* @access public
*
- * @returns {void}
+ * @return {void}
*/
keepPreviewAlive: function keepPreviewAlive() {
var previewer = this, keepAliveTick, timeoutId, handleMissingKeepAlive, scheduleKeepAliveCheck;
@@ -6731,7 +6735,7 @@
*
* @since 3.4.0
* @access public
- * @returns {void}
+ * @return {void}
*/
refresh: function() {
var previewer = this, onSettingChange;
@@ -6905,7 +6909,7 @@
* @param {object} args
* @param {object} args.settingValidities
* @param {boolean} [args.focusInvalidControl=false]
- * @returns {void}
+ * @return {void}
*/
api._handleSettingValidities = function handleSettingValidities( args ) {
var invalidSettingControls, invalidSettings = [], wasFocused = false;
@@ -6978,7 +6982,7 @@
*
* @since 4.6.0
* @param {string[]} settingIds Setting IDs.
- * @returns {object<string, wp.customize.Control>} Mapping setting ids to arrays of controls.
+ * @return {object<string, wp.customize.Control>} Mapping setting ids to arrays of controls.
*/
api.findControlsForSettings = function findControlsForSettings( settingIds ) {
var controls = {}, settingControls;
@@ -7426,7 +7430,7 @@
* @param {string} [args.status=publish] Status.
* @param {string} [args.date] Date, in local time in MySQL format.
* @param {string} [args.title] Title
- * @returns {jQuery.promise} Promise.
+ * @return {jQuery.promise} Promise.
*/
save: function( args ) {
var previewer = this,
@@ -7699,7 +7703,7 @@
*
* @since 4.9.0
*
- * @returns {jQuery.promise} Promise.
+ * @return {jQuery.promise} Promise.
*/
trash: function trash() {
var request, success, fail;
@@ -8033,7 +8037,7 @@
* @access private
*
* @param {boolean} isIncluded Is UUID included.
- * @returns {void}
+ * @return {void}
*/
populateChangesetUuidParam = function( isIncluded ) {
var urlParser, queryParams;
@@ -8192,7 +8196,7 @@
* @param {object} [args] - Args.
* @param {object} [args.lockUser] - Lock user data.
* @param {boolean} [args.allowOverride=false] - Whether override is allowed.
- * @returns {void}
+ * @return {void}
*/
function startLock( args ) {
if ( args && args.lockUser ) {
@@ -8251,7 +8255,7 @@
/**
* Obtain the URL to restore the autosave.
*
- * @returns {string} Customizer URL.
+ * @return {string} Customizer URL.
*/
function getAutosaveRestorationUrl() {
var urlParser, queryParams;
@@ -8272,7 +8276,7 @@
* Remove parameter from the URL.
*
* @param {Array} params - Parameter names to remove.
- * @returns {void}
+ * @return {void}
*/
function stripParamsFromLocation( params ) {
var urlParser = document.createElement( 'a' ), queryParams, strippedParams = 0;
@@ -8295,7 +8299,7 @@
/**
* Dismiss autosave.
*
- * @returns {void}
+ * @return {void}
*/
function dismissAutosave() {
if ( autosaveDismissed ) {
@@ -8314,7 +8318,7 @@
/**
* Add notification regarding the availability of an autosave to restore.
*
- * @returns {void}
+ * @return {void}
*/
function addAutosaveRestoreNotification() {
var code = 'autosave_available', onStateChange;
@@ -8492,7 +8496,7 @@
* @access private
*
* @param {wp.customize.Panel|wp.customize.Section} container Construct.
- * @returns {void}
+ * @return {void}
*/
changeContainer = function( container ) {
var newInstance = container,
@@ -8604,7 +8608,7 @@
* @since 4.7.0
* @access private
*
- * @returns {void}
+ * @return {void}
*/
updateHeaderHeight = function() {
activeHeader.height = activeHeader.element.outerHeight();
@@ -8619,7 +8623,7 @@
* @param {object} header - Header.
* @param {number} scrollTop - Scroll top.
* @param {number} scrollDirection - Scroll direction, negative number being up and positive being down.
- * @returns {void}
+ * @return {void}
*/
positionStickyHeader = function( header, scrollTop, scrollDirection ) {
var headerElement = header.element,