summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorSergey Biryukov <sergeybiryukov@git.wordpress.org>2019-11-29 17:59:47 +0000
committerSergey Biryukov <sergeybiryukov@git.wordpress.org>2019-11-29 17:59:47 +0000
commita03bb5454673d62dae26f50cd13619e92b23c884 (patch)
treefaac09874cdb44e25548961f163c0f8a06dc9028
parentea5bfe134f50b91680369f50b4d12d233b1f917c (diff)
downloadwordpress-a03bb5454673d62dae26f50cd13619e92b23c884.tar.gz
wordpress-a03bb5454673d62dae26f50cd13619e92b23c884.zip
Docs: Replace `@returns` tags in JS docs with `@return`.
Per the documentation standards, `@returns` is an unsupported synonym, `@return` should be used instead: https://make.wordpress.org/core/handbook/best-practices/inline-documentation-standards/javascript/ See #48303. git-svn-id: https://develop.svn.wordpress.org/trunk@46800 602fd350-edb4-49c9-b593-d223f7449a82
-rw-r--r--src/js/_enqueues/admin/comment.js6
-rw-r--r--src/js/_enqueues/admin/common.js124
-rw-r--r--src/js/_enqueues/admin/custom-background.js14
-rw-r--r--src/js/_enqueues/admin/custom-header.js4
-rw-r--r--src/js/_enqueues/admin/inline-edit-post.js30
-rw-r--r--src/js/_enqueues/admin/inline-edit-tax.js12
-rw-r--r--src/js/_enqueues/admin/link.js4
-rw-r--r--src/js/_enqueues/admin/media-upload.js10
-rw-r--r--src/js/_enqueues/admin/media.js12
-rw-r--r--src/js/_enqueues/admin/post.js16
-rw-r--r--src/js/_enqueues/admin/postbox.js22
-rw-r--r--src/js/_enqueues/admin/tags-suggest.js2
-rw-r--r--src/js/_enqueues/admin/tags.js10
-rw-r--r--src/js/_enqueues/lib/color-picker.js26
-rw-r--r--src/js/_enqueues/lib/image-edit.js82
-rw-r--r--src/js/_enqueues/lib/lists.js26
-rw-r--r--src/js/_enqueues/vendor/mediaelement/wp-mediaelement.js4
-rw-r--r--src/js/_enqueues/vendor/mediaelement/wp-playlist.js2
-rw-r--r--src/js/_enqueues/wp/a11y.js2
-rw-r--r--src/js/_enqueues/wp/api.js8
-rw-r--r--src/js/_enqueues/wp/autosave.js68
-rw-r--r--src/js/_enqueues/wp/code-editor.js10
-rw-r--r--src/js/_enqueues/wp/customize/base.js6
-rw-r--r--src/js/_enqueues/wp/customize/controls.js228
-rw-r--r--src/js/_enqueues/wp/customize/nav-menus.js40
-rw-r--r--src/js/_enqueues/wp/customize/preview-nav-menus.js4
-rw-r--r--src/js/_enqueues/wp/customize/preview-widgets.js52
-rw-r--r--src/js/_enqueues/wp/customize/preview.js22
-rw-r--r--src/js/_enqueues/wp/customize/selective-refresh.js6
-rw-r--r--src/js/_enqueues/wp/customize/widgets.js24
-rw-r--r--src/js/_enqueues/wp/dashboard.js22
-rw-r--r--src/js/_enqueues/wp/editor/base.js16
-rw-r--r--src/js/_enqueues/wp/editor/dfw.js82
-rw-r--r--src/js/_enqueues/wp/heartbeat.js44
-rw-r--r--src/js/_enqueues/wp/media/audiovideo.js8
-rw-r--r--src/js/_enqueues/wp/media/editor.js42
-rw-r--r--src/js/_enqueues/wp/media/models.js8
-rw-r--r--src/js/_enqueues/wp/media/views.js2
-rw-r--r--src/js/_enqueues/wp/password-strength-meter.js4
-rw-r--r--src/js/_enqueues/wp/theme-plugin-editor.js28
-rw-r--r--src/js/_enqueues/wp/theme.js2
-rw-r--r--src/js/_enqueues/wp/updates.js2
-rw-r--r--src/js/_enqueues/wp/utils/word-count.js2
-rw-r--r--src/js/_enqueues/wp/widgets/custom-html.js24
-rw-r--r--src/js/_enqueues/wp/widgets/media-audio.js8
-rw-r--r--src/js/_enqueues/wp/widgets/media-gallery.js16
-rw-r--r--src/js/_enqueues/wp/widgets/media-image.js10
-rw-r--r--src/js/_enqueues/wp/widgets/media-video.js12
-rw-r--r--src/js/_enqueues/wp/widgets/media.js74
-rw-r--r--src/js/_enqueues/wp/widgets/text.js24
-rw-r--r--src/js/media/controllers/cropper.js12
-rw-r--r--src/js/media/controllers/customize-image-cropper.js2
-rw-r--r--src/js/media/controllers/edit-image.js6
-rw-r--r--src/js/media/controllers/gallery-add.js4
-rw-r--r--src/js/media/controllers/library.js8
-rw-r--r--src/js/media/controllers/region.js10
-rw-r--r--src/js/media/controllers/state-machine.js18
-rw-r--r--src/js/media/models/attachment.js12
-rw-r--r--src/js/media/models/attachments.js38
-rw-r--r--src/js/media/models/query.js10
-rw-r--r--src/js/media/models/selection.js4
-rw-r--r--src/js/media/views/attachment-compat.js4
-rw-r--r--src/js/media/views/attachment.js18
-rw-r--r--src/js/media/views/attachment/details.js12
-rw-r--r--src/js/media/views/attachments.js24
-rw-r--r--src/js/media/views/attachments/browser.js4
-rw-r--r--src/js/media/views/button-group.js2
-rw-r--r--src/js/media/views/button.js2
-rw-r--r--src/js/media/views/embed/url.js2
-rw-r--r--src/js/media/views/focus-manager.js22
-rw-r--r--src/js/media/views/frame.js6
-rw-r--r--src/js/media/views/iframe.js2
-rw-r--r--src/js/media/views/media-details.js4
-rw-r--r--src/js/media/views/media-frame.js16
-rw-r--r--src/js/media/views/menu-item.js2
-rw-r--r--src/js/media/views/menu.js2
-rw-r--r--src/js/media/views/modal.js16
-rw-r--r--src/js/media/views/priority-list.js8
-rw-r--r--src/js/media/views/search.js2
-rw-r--r--src/js/media/views/settings.js2
-rw-r--r--src/js/media/views/settings/attachment-display.js2
-rw-r--r--src/js/media/views/toolbar.js8
-rw-r--r--src/js/media/views/uploader/editor.js2
-rw-r--r--src/js/media/views/uploader/inline.js6
-rw-r--r--src/js/media/views/uploader/status.js4
-rw-r--r--src/js/media/views/view.js4
86 files changed, 805 insertions, 801 deletions
diff --git a/src/js/_enqueues/admin/comment.js b/src/js/_enqueues/admin/comment.js
index 04d6e539f2..f1fd2213a0 100644
--- a/src/js/_enqueues/admin/comment.js
+++ b/src/js/_enqueues/admin/comment.js
@@ -27,7 +27,7 @@ jQuery(document).ready( function($) {
* @listens $edittimestamp:click
*
* @param {Event} event The event object.
- * @returns {void}
+ * @return {void}
*/
$edittimestamp.click( function( event ) {
if ( $timestampdiv.is( ':hidden' ) ) {
@@ -46,7 +46,7 @@ jQuery(document).ready( function($) {
* @listens .cancel-timestamp:click
*
* @param {Event} event The event object.
- * @returns {void}
+ * @return {void}
*/
$timestampdiv.find('.cancel-timestamp').click( function( event ) {
@@ -68,7 +68,7 @@ jQuery(document).ready( function($) {
* @listens .save-timestamp:click
*
* @param {Event} event The event object.
- * @returns {void}
+ * @return {void}
*/
$timestampdiv.find('.save-timestamp').click( function( event ) { // crazyhorse - multiple ok cancels
var aa = $('#aa').val(), mm = $('#mm').val(), jj = $('#jj').val(), hh = $('#hh').val(), mn = $('#mn').val(),
diff --git a/src/js/_enqueues/admin/common.js b/src/js/_enqueues/admin/common.js
index 049b7de2e0..0541c8d0f2 100644
--- a/src/js/_enqueues/admin/common.js
+++ b/src/js/_enqueues/admin/common.js
@@ -42,7 +42,7 @@ window.columns = {
*
* @since 2.7.0
*
- * @returns {void}
+ * @return {void}
*/
init : function() {
var that = this;
@@ -64,7 +64,7 @@ window.columns = {
*
* @since 3.0.0
*
- * @returns {void}
+ * @return {void}
*/
saveManageColumnsState : function() {
var hidden = this.hidden();
@@ -82,7 +82,7 @@ window.columns = {
* @since 3.0.0
* @param {string} column The column name.
*
- * @returns {void}
+ * @return {void}
*/
checked : function(column) {
$('.column-' + column).removeClass( 'hidden' );
@@ -95,7 +95,7 @@ window.columns = {
* @since 3.0.0
* @param {string} column The column name.
*
- * @returns {void}
+ * @return {void}
*/
unchecked : function(column) {
$('.column-' + column).addClass( 'hidden' );
@@ -107,7 +107,7 @@ window.columns = {
*
* @since 3.0.0
*
- * @returns {string} The hidden column names separated by a comma.
+ * @return {string} The hidden column names separated by a comma.
*/
hidden : function() {
return $( '.manage-column[id]' ).filter( '.hidden' ).map(function() {
@@ -120,7 +120,7 @@ window.columns = {
*
* @since 3.0.0
*
- * @returns {string} String containing the checked column names.
+ * @return {string} String containing the checked column names.
*/
useCheckboxesForHidden : function() {
this.hidden = function(){
@@ -156,7 +156,7 @@ $document.ready(function(){columns.init();});
*
* @param {jQuery} form The form to validate.
*
- * @returns {boolean} Returns true if all required fields are not an empty string.
+ * @return {boolean} Returns true if all required fields are not an empty string.
*/
window.validateForm = function( form ) {
return !$( form )
@@ -176,7 +176,7 @@ window.validateForm = function( form ) {
*
* @type {{warn: showNotice.warn, note: showNotice.note}}
*
- * @returns {void}
+ * @return {void}
*/
window.showNotice = {
@@ -185,7 +185,7 @@ window.showNotice = {
*
* @since 2.7.0
*
- * @returns {boolean} Returns true if the message is confirmed.
+ * @return {boolean} Returns true if the message is confirmed.
*/
warn : function() {
var msg = commonL10n.warnDelete || '';
@@ -217,7 +217,7 @@ window.showNotice = {
* toggleEvent: screenMeta.toggleEvent, open: screenMeta.open,
* close: screenMeta.close}}
*
- * @returns {void}
+ * @return {void}
*/
window.screenMeta = {
element: null, // #screen-meta
@@ -229,7 +229,7 @@ window.screenMeta = {
*
* @since 3.2.0
*
- * @returns {void}
+ * @return {void}
*/
init: function() {
this.element = $('#screen-meta');
@@ -244,7 +244,7 @@ window.screenMeta = {
*
* @since 3.2.0
*
- * @returns {void}
+ * @return {void}
*/
toggleEvent: function() {
var panel = $( '#' + $( this ).attr( 'aria-controls' ) );
@@ -266,7 +266,7 @@ window.screenMeta = {
* @param {jQuery} panel The screen meta options panel div.
* @param {jQuery} button The toggle button.
*
- * @returns {void}
+ * @return {void}
*/
open: function( panel, button ) {
@@ -279,7 +279,7 @@ window.screenMeta = {
*
* @since 3.2.0
*
- * @returns {void}
+ * @return {void}
*/
panel.slideDown( 'fast', function() {
panel.focus();
@@ -297,7 +297,7 @@ window.screenMeta = {
* @param {jQuery} panel The screen meta options panel div.
* @param {jQuery} button The toggle button.
*
- * @returns {void}
+ * @return {void}
*/
close: function( panel, button ) {
/**
@@ -305,7 +305,7 @@ window.screenMeta = {
*
* @since 3.2.0
*
- * @returns {void}
+ * @return {void}
*/
panel.slideUp( 'fast', function() {
button.removeClass( 'screen-meta-active' ).attr( 'aria-expanded', false );
@@ -322,7 +322,7 @@ window.screenMeta = {
*
* @param {Event} e The event object.
*
- * @returns {void}
+ * @return {void}
*/
$('.contextual-help-tabs').delegate('a', 'click', function(e) {
var link = $(this),
@@ -503,7 +503,7 @@ $document.ready( function() {
*
* @param {Event} e The event object.
*
- * @returns {void}
+ * @return {void}
*/
$adminmenu.on('click.wp-submenu-head', '.wp-submenu-head', function(e){
$(e.target).parent().siblings('a').get(0).click();
@@ -512,7 +512,7 @@ $document.ready( function() {
/**
* Collapses the admin menu.
*
- * @returns {void}
+ * @return {void}
*/
$( '#collapse-button' ).on( 'click.collapse-menu', function() {
var viewportWidth = getViewportWidth() || 961;
@@ -551,7 +551,7 @@ $document.ready( function() {
*
* @since 4.4.0
*
- * @returns {void}
+ * @return {void}
*/
function currentMenuItemHasPopup() {
var $current = $( 'a.wp-has-current-submenu' );
@@ -574,7 +574,7 @@ $document.ready( function() {
*
* @param {jQuery} $menuItem The parent menu item containing the submenu.
*
- * @returns {void}
+ * @return {void}
*/
function adjustSubmenu( $menuItem ) {
var bottomOffset, pageHeight, adjustment, theFold, menutop, wintop, maxtop,
@@ -613,7 +613,7 @@ $document.ready( function() {
*
* @param {Event} e The event object.
*
- * @returns {void}
+ * @return {void}
*/
$body.on( mobileEvent+'.wp-mobile-hover', function(e) {
if ( $adminmenu.data('wp-responsive') ) {
@@ -630,7 +630,7 @@ $document.ready( function() {
*
* @param {Event} event The event object.
*
- * @returns {void}
+ * @return {void}
*/
$adminmenu.find( 'a.wp-has-submenu' ).on( mobileEvent + '.wp-mobile-hover', function( event ) {
var $menuItem = $(this).parent();
@@ -657,7 +657,7 @@ $document.ready( function() {
/**
* Opens the submenu when hovered over the menu item for desktops.
*
- * @returns {void}
+ * @return {void}
*/
over: function() {
var $menuItem = $( this ),
@@ -681,7 +681,7 @@ $document.ready( function() {
/**
* Closes the submenu when no longer hovering the menu item.
*
- * @returns {void}
+ * @return {void}
*/
out: function(){
if ( $adminmenu.data( 'wp-responsive' ) ) {
@@ -701,7 +701,7 @@ $document.ready( function() {
*
* @param {Event} event The event object.
*
- * @returns {void}
+ * @return {void}
*/
$adminmenu.on( 'focus.adminmenu', '.wp-submenu a', function( event ) {
if ( $adminmenu.data( 'wp-responsive' ) ) {
@@ -716,7 +716,7 @@ $document.ready( function() {
*
* @param {Event} event The event object.
*
- * @returns {void}
+ * @return {void}
*/
}).on( 'blur.adminmenu', '.wp-submenu a', function( event ) {
if ( $adminmenu.data( 'wp-responsive' ) ) {
@@ -728,7 +728,7 @@ $document.ready( function() {
/**
* Adjusts the size for the submenu.
*
- * @returns {void}
+ * @return {void}
*/
}).find( 'li.wp-has-submenu.wp-not-current-submenu' ).on( 'focusin.adminmenu', function() {
adjustSubmenu( $( this ) );
@@ -751,7 +751,7 @@ $document.ready( function() {
*
* @since 4.4.0
*
- * @returns {void}
+ * @return {void}
*/
function makeNoticesDismissible() {
$( '.notice.is-dismissible' ).each( function() {
@@ -784,7 +784,7 @@ $document.ready( function() {
*
* This event needs to be delegated. Ticket #37973.
*
- * @returns {boolean} Returns whether a checkbox is checked or not.
+ * @return {boolean} Returns whether a checkbox is checked or not.
*/
$body.on( 'click', 'tbody > tr > .check-column :checkbox', function( event ) {
// Shift click to select a range of checkboxes.
@@ -813,7 +813,7 @@ $document.ready( function() {
/**
* Determines if all checkboxes are checked.
*
- * @returns {boolean} Returns true if there are no unchecked checkboxes.
+ * @return {boolean} Returns true if there are no unchecked checkboxes.
*/
$(this).closest('table').children('thead, tfoot').find(':checkbox').prop('checked', function() {
return ( 0 === unchecked.length );
@@ -832,7 +832,7 @@ $document.ready( function() {
*
* @param {Event} event The event object.
*
- * @returns {boolean}
+ * @return {boolean}
*/
$body.on( 'click.wp-toggle-checkboxes', 'thead .check-column :checkbox, tfoot .check-column :checkbox', function( event ) {
var $this = $(this),
@@ -845,7 +845,7 @@ $document.ready( function() {
/**
* Updates the checked state on the checkbox in the table.
*
- * @returns {boolean} True checks the checkbox, False unchecks the checkbox.
+ * @return {boolean} True checks the checkbox, False unchecks the checkbox.
*/
.prop('checked', function() {
if ( $(this).is(':hidden,:disabled') ) {
@@ -867,7 +867,7 @@ $document.ready( function() {
/**
* Syncs the bulk checkboxes on the top and bottom of the table.
*
- * @returns {boolean} True checks the checkbox, False unchecks the checkbox.
+ * @return {boolean} True checks the checkbox, False unchecks the checkbox.
*/
.prop('checked', function() {
if ( toggle ) {
@@ -883,7 +883,7 @@ $document.ready( function() {
/**
* Shows row actions on focus of its parent container element or any other elements contained within.
*
- * @returns {void}
+ * @return {void}
*/
$( '#wpbody-content' ).on({
focusin: function() {
@@ -918,7 +918,7 @@ $document.ready( function() {
*
* @param {Event} e The event object.
*
- * @returns {void}
+ * @return {void}
*/
$('#newcontent').bind('keydown.wpevent_InsertTab', function(e) {
var el = e.target, selStart, selEnd, val, scroll, sel;
@@ -977,7 +977,7 @@ $document.ready( function() {
*
* The form closest to the pageInput is the post-filter form.
*
- * @returns {void}
+ * @return {void}
*/
pageInput.closest('form').submit( function() {
/*
@@ -992,7 +992,7 @@ $document.ready( function() {
/**
* Resets the bulk actions when the search button is clicked.
*
- * @returns {void}
+ * @return {void}
*/
$('.search-box input[type="search"], .search-box input[type="submit"]').mousedown(function () {
$('select[name^="action"]').val('-1');
@@ -1003,7 +1003,7 @@ $document.ready( function() {
*
* @param {Event} e The event object.
*
- * @returns {void}
+ * @return {void}
*/
$('#contextual-help-link, #show-settings-link').on( 'focus.scroll-into-view', function(e){
if ( e.target.scrollIntoView )
@@ -1013,7 +1013,7 @@ $document.ready( function() {
/**
* Disables the submit upload buttons when no data is entered.
*
- * @returns {void}
+ * @return {void}
*/
(function(){
var button, input, form = $('form.wp-upload-form');
@@ -1030,7 +1030,7 @@ $document.ready( function() {
*
* @since 3.5.0
*
- * @returns {void}
+ * @return {void}
*/
function toggleUploadButton() {
// When no inputs have a value, disable the upload buttons.
@@ -1052,7 +1052,7 @@ $document.ready( function() {
*
* @since 4.1.0
*
- * @returns {void}
+ * @return {void}
*/
function pinMenu( event ) {
var windowPos = $window.scrollTop(),
@@ -1195,7 +1195,7 @@ $document.ready( function() {
*
* @since 4.1.0
*
- * @returns {void}
+ * @return {void}
*/
function resetHeights() {
height = {
@@ -1211,7 +1211,7 @@ $document.ready( function() {
*
* @since 4.1.0
*
- * @returns {void}
+ * @return {void}
*/
function unpinMenu() {
if ( isIOS || ! menuIsPinned ) {
@@ -1231,7 +1231,7 @@ $document.ready( function() {
*
* @since 4.1.0
*
- * @returns {void}
+ * @return {void}
*/
function setPinMenu() {
resetHeights();
@@ -1260,7 +1260,7 @@ $document.ready( function() {
*
* @since 3.8.0
*
- *@returns {void}
+ * @return {void}
*/
window.wpResponsive = {
@@ -1269,7 +1269,7 @@ $document.ready( function() {
*
* @since 3.8.0
*
- * @returns {void}
+ * @return {void}
*/
init: function() {
var self = this;
@@ -1327,7 +1327,7 @@ $document.ready( function() {
*
* @since 5.3.0
*
- * @returns {void}
+ * @return {void}
*/
maybeDisableSortables: function() {
var width = navigator.userAgent.indexOf('AppleWebKit/') > -1 ? $window.width() : window.innerWidth;
@@ -1350,7 +1350,7 @@ $document.ready( function() {
*
* @since 3.8.0
*
- * @returns {void}
+ * @return {void}
*/
activate: function() {
setPinMenu();
@@ -1371,7 +1371,7 @@ $document.ready( function() {
*
* @since 3.8.0
*
- * @returns {void}
+ * @return {void}
*/
deactivate: function() {
setPinMenu();
@@ -1385,7 +1385,7 @@ $document.ready( function() {
*
* @since 3.8.0
*
- * @returns {void}
+ * @return {void}
*/
trigger: function() {
var viewportWidth = getViewportWidth();
@@ -1421,7 +1421,7 @@ $document.ready( function() {
*
* @since 3.8.0
*
- * @returns {void}
+ * @return {void}
*/
enableOverlay: function() {
if ( $overlay.length === 0 ) {
@@ -1444,7 +1444,7 @@ $document.ready( function() {
*
* @since 3.8.0
*
- * @returns {void}
+ * @return {void}
*/
disableOverlay: function() {
$toolbarPopups.off( 'click.wp-responsive' );
@@ -1456,7 +1456,7 @@ $document.ready( function() {
*
* @since 3.8.0
*
- * @returns {void}
+ * @return {void}
*/
disableSortables: function() {
if ( $sortables.length ) {
@@ -1472,7 +1472,7 @@ $document.ready( function() {
*
* @since 3.8.0
*
- * @returns {void}
+ * @return {void}
*/
enableSortables: function() {
if ( $sortables.length ) {
@@ -1489,7 +1489,7 @@ $document.ready( function() {
*
* @since 4.5.0
*
- * @returns {void}
+ * @return {void}
*/
function aria_button_if_js() {
$( '.aria-button-if-js' ).attr( 'role', 'button' );
@@ -1504,8 +1504,8 @@ $document.ready( function() {
*
* @since 4.7.0
*
- * @returns {number|boolean} The current viewport width or false if the
- * browser doesn't support innerWidth (IE < 9).
+ * @return {number|boolean} The current viewport width or false if the
+ * browser doesn't support innerWidth (IE < 9).
*/
function getViewportWidth() {
var viewportWidth = false;
@@ -1526,7 +1526,7 @@ $document.ready( function() {
*
* @since 4.7.0
*
- * @returns {void}
+ * @return {void}
*/
function setMenuState() {
var viewportWidth = getViewportWidth() || 961;
@@ -1554,7 +1554,7 @@ $document.ready( function() {
*
* @since 4.7.0
*
- * @returns {void}
+ * @return {void}
*/
$document.on( 'wp-menu-state-set wp-collapse-menu', function( event, eventData ) {
var $collapseButton = $( '#collapse-button' ),
@@ -1613,7 +1613,7 @@ $document.ready( function() {
*
* @since 3.8.0
*
- * @returns {void}
+ * @return {void}
*/
function triggerEvent() {
$document.trigger( 'wp-window-resized' );
@@ -1624,7 +1624,7 @@ $document.ready( function() {
*
* @since 3.8.0
*
- * @returns {void}
+ * @return {void}
*/
function fireOnce() {
window.clearTimeout( timeout );
diff --git a/src/js/_enqueues/admin/custom-background.js b/src/js/_enqueues/admin/custom-background.js
index a948e780a4..346ae9c627 100644
--- a/src/js/_enqueues/admin/custom-background.js
+++ b/src/js/_enqueues/admin/custom-background.js
@@ -21,7 +21,7 @@
*
* @since 3.5.0
*
- * @returns {void}
+ * @return {void}
*/
$('#background-color').wpColorPicker({
change: function( event, ui ) {
@@ -37,7 +37,7 @@
*
* @since 4.7.0
*
- * @returns {void}
+ * @return {void}
*/
$( 'select[name="background-size"]' ).change( function() {
bgImage.css( 'background-size', $( this ).val() );
@@ -48,7 +48,7 @@
*
* @since 4.7.0
*
- * @returns {void}
+ * @return {void}
*/
$( 'input[name="background-position"]' ).change( function() {
bgImage.css( 'background-position', $( this ).val() );
@@ -59,7 +59,7 @@
*
* @since 3.0.0
*
- * @returns {void}
+ * @return {void}
*/
$( 'input[name="background-repeat"]' ).change( function() {
bgImage.css( 'background-repeat', $( this ).is( ':checked' ) ? 'repeat' : 'no-repeat' );
@@ -70,7 +70,7 @@
*
* @since 4.7.0
*
- * @returns {void}
+ * @return {void}
*/
$( 'input[name="background-attachment"]' ).change( function() {
bgImage.css( 'background-attachment', $( this ).is( ':checked' ) ? 'scroll' : 'fixed' );
@@ -81,7 +81,7 @@
*
* @since 3.5.0
*
- * @returns {void}
+ * @return {void}
*/
$('#choose-from-library-link').click( function( event ) {
var $el = $(this);
@@ -121,7 +121,7 @@
*
* @since 3.5.0
*
- * @returns {void}
+ * @return {void}
*/
frame.on( 'select', function() {
// Grab the selected attachment.
diff --git a/src/js/_enqueues/admin/custom-header.js b/src/js/_enqueues/admin/custom-header.js
index e00c70cd24..b1414a439e 100644
--- a/src/js/_enqueues/admin/custom-header.js
+++ b/src/js/_enqueues/admin/custom-header.js
@@ -33,7 +33,7 @@
* @since 3.5.0
* @deprecated 4.1.0
*
- * @returns {void}
+ * @return {void}
*/
$('#choose-from-library-link').click( function( event ) {
var $el = $(this);
@@ -71,7 +71,7 @@
* @since 3.5.0
* @deprecated 4.1.0
*
- * @returns {void}
+ * @return {void}
*/
frame.on( 'select', function() {
// Grab the selected attachment.
diff --git a/src/js/_enqueues/admin/inline-edit-post.js b/src/js/_enqueues/admin/inline-edit-post.js
index b39b9b6466..85cc742844 100644
--- a/src/js/_enqueues/admin/inline-edit-post.js
+++ b/src/js/_enqueues/admin/inline-edit-post.js
@@ -36,7 +36,7 @@ window.wp = window.wp || {};
* @memberof inlineEditPost
* @since 2.7.0
*
- * @returns {void}
+ * @return {void}
*/
init : function(){
var t = this, qeRow = $('#inline-edit'), bulkRow = $('#bulk-edit');
@@ -48,7 +48,7 @@ window.wp = window.wp || {};
/**
* Binds the escape key to revert the changes and close the quick editor.
*
- * @returns {boolean} The result of revert.
+ * @return {boolean} The result of revert.
*/
qeRow.keyup(function(e){
// Revert changes if escape key is pressed.
@@ -60,7 +60,7 @@ window.wp = window.wp || {};
/**
* Binds the escape key to revert the changes and close the bulk editor.
*
- * @returns {boolean} The result of revert.
+ * @return {boolean} The result of revert.
*/
bulkRow.keyup(function(e){
// Revert changes if escape key is pressed.
@@ -72,7 +72,7 @@ window.wp = window.wp || {};
/**
* Reverts changes and close the quick editor if the cancel button is clicked.
*
- * @returns {boolean} The result of revert.
+ * @return {boolean} The result of revert.
*/
$( '.cancel', qeRow ).click( function() {
return inlineEditPost.revert();
@@ -81,7 +81,7 @@ window.wp = window.wp || {};
/**
* Saves changes in the quick editor if the save(named: update) button is clicked.
*
- * @returns {boolean} The result of save.
+ * @return {boolean} The result of save.
*/
$( '.save', qeRow ).click( function() {
return inlineEditPost.save(this);
@@ -90,7 +90,7 @@ window.wp = window.wp || {};
/**
* If enter is pressed, and the target is not the cancel button, save the post.
*
- * @returns {boolean} The result of save.
+ * @return {boolean} The result of save.
*/
$('td', qeRow).keydown(function(e){
if ( e.which === 13 && ! $( e.target ).hasClass( 'cancel' ) ) {
@@ -101,7 +101,7 @@ window.wp = window.wp || {};
/**
* Reverts changes and close the bulk editor if the cancel button is clicked.
*
- * @returns {boolean} The result of revert.
+ * @return {boolean} The result of revert.
*/
$( '.cancel', bulkRow ).click( function() {
return inlineEditPost.revert();
@@ -247,7 +247,7 @@ window.wp = window.wp || {};
*
* @param {number|Object} id The id of the clicked post or an element within a post
* table row.
- * @returns {boolean} Always returns false at the end of execution.
+ * @return {boolean} Always returns false at the end of execution.
*/
edit : function(id) {
var t = this, fields, editRow, rowData, status, pageOpt, pageLevel, nextPage, pageLoop = true, nextLevel, f, val, pw;
@@ -285,7 +285,7 @@ window.wp = window.wp || {};
/**
* Replaces the image for a Twemoji(Twitter emoji) with it's alternate text.
*
- * @returns Alternate text from the image.
+ * @return {string} Alternate text from the image.
*/
val.find( 'img' ).replaceWith( function() { return this.alt; } );
val = val.text();
@@ -385,9 +385,9 @@ window.wp = window.wp || {};
*
* @since 2.7.0
*
- * @param {int} id The id for the post that has been changed.
- * @returns {boolean} false, so the form does not submit when pressing
- * Enter on a focused field.
+ * @param {int} id The id for the post that has been changed.
+ * @return {boolean} False, so the form does not submit when pressing
+ * Enter on a focused field.
*/
save : function(id) {
var params, fields, page = $('.post_status_page').val() || '';
@@ -453,7 +453,7 @@ window.wp = window.wp || {};
* @memberof inlineEditPost
* @since 2.7.0
*
- * @returns {boolean} Always returns false.
+ * @return {boolean} Always returns false.
*/
revert : function(){
var $tableWideFat = $( '.widefat' ),
@@ -497,8 +497,8 @@ window.wp = window.wp || {};
* @memberof inlineEditPost
* @since 2.7.0
*
- * @param {Object} o DOM row object to get the id for.
- * @returns {string} The post id extracted from the table row in the object.
+ * @param {Object} o DOM row object to get the id for.
+ * @return {string} The post id extracted from the table row in the object.
*/
getId : function(o) {
var id = $(o).closest('tr').attr('id'),
diff --git a/src/js/_enqueues/admin/inline-edit-tax.js b/src/js/_enqueues/admin/inline-edit-tax.js
index bea01963bb..dcaa8d2bdc 100644
--- a/src/js/_enqueues/admin/inline-edit-tax.js
+++ b/src/js/_enqueues/admin/inline-edit-tax.js
@@ -29,7 +29,7 @@ window.inlineEditTax = {
*
* @this inlineEditTax
* @memberof inlineEditTax
- * @returns {void}
+ * @return {void}
*/
init : function() {
var t = this, row = $('#inline-edit');
@@ -96,7 +96,7 @@ window.inlineEditTax = {
*
* @param {HTMLElement} el An element within the table row or the table row
* itself that we want to quick edit.
- * @returns {void}
+ * @return {void}
*/
toggle : function(el) {
var t = this;
@@ -115,7 +115,7 @@ window.inlineEditTax = {
* @param {string|HTMLElement} id The ID of the term we want to quick edit or an
* element within the table row or the
* table row itself.
- * @returns {boolean} Always returns false.
+ * @return {boolean} Always returns false.
*/
edit : function(id) {
var editRow, rowData, val,
@@ -162,7 +162,7 @@ window.inlineEditTax = {
* @param {string|HTMLElement} id The ID of the term we want to quick edit or an
* element within the table row or the
* table row itself.
- * @returns {boolean} Always returns false.
+ * @return {boolean} Always returns false.
*/
save : function(id) {
var params, fields, tax = $('input[name="taxonomy"]').val() || '';
@@ -255,7 +255,7 @@ window.inlineEditTax = {
*
* @this inlineEditTax
* @memberof inlineEditTax
- * @returns {void}
+ * @return {void}
*/
revert : function() {
var id = $('table.widefat tr.inline-editor').attr('id');
@@ -280,7 +280,7 @@ window.inlineEditTax = {
* @memberof inlineEditTax
*
* @param {HTMLElement} o An element within the table row or the table row itself.
- * @returns {string} The ID of the term based on the element.
+ * @return {string} The ID of the term based on the element.
*/
getId : function(o) {
var id = o.tagName === 'TR' ? o.id : $(o).parents('tr').attr('id'), parts = id.split('-');
diff --git a/src/js/_enqueues/admin/link.js b/src/js/_enqueues/admin/link.js
index 5b73fe61fb..076d07c44f 100644
--- a/src/js/_enqueues/admin/link.js
+++ b/src/js/_enqueues/admin/link.js
@@ -122,8 +122,8 @@ jQuery(document).ready( function($) {
* @ignore
*
* @param {Event} event The event object.
- * @returns {boolean} Always returns false to prevent regular link
- * functionality.
+ * @return {boolean} Always returns false to prevent regular link
+ * functionality.
*/
$('#category-add-toggle').click( function() {
$(this).parents('div:first').toggleClass( 'wp-hidden-children' );
diff --git a/src/js/_enqueues/admin/media-upload.js b/src/js/_enqueues/admin/media-upload.js
index 9055cf9ca4..3f45e2ef80 100644
--- a/src/js/_enqueues/admin/media-upload.js
+++ b/src/js/_enqueues/admin/media-upload.js
@@ -22,9 +22,9 @@
* @global
*
* @param {string} html The HTML to be sent to the editor.
- * @returns {void|boolean} Returns false when both TinyMCE and QTags instances
- * are unavailable. This means that the HTML was not
- * sent to the editor.
+ * @return {void|boolean} Returns false when both TinyMCE and QTags instances
+ * are unavailable. This means that the HTML was not
+ * sent to the editor.
*/
window.send_to_editor = function( html ) {
var editor,
@@ -71,8 +71,8 @@ window.send_to_editor = function( html ) {
*
* @global
*
- * @returns {Object[]} Array containing jQuery objects for all the found
- * ThickBox anchors.
+ * @return {Object[]} Array containing jQuery objects for all the found
+ * ThickBox anchors.
*/
window.tb_position = function() {
var tbWindow = $('#TB_window'),
diff --git a/src/js/_enqueues/admin/media.js b/src/js/_enqueues/admin/media.js
index 4d9a5ec46b..5bcad08ef6 100644
--- a/src/js/_enqueues/admin/media.js
+++ b/src/js/_enqueues/admin/media.js
@@ -26,7 +26,7 @@
* @param {string} af_name The name of the affected element.
* @param {string} af_val The value of the affected post element.
*
- * @returns {boolean} Always returns false.
+ * @return {boolean} Always returns false.
*/
open: function( af_name, af_val ) {
var overlay = $( '.ui-find-overlay' );
@@ -65,7 +65,7 @@
*
* @memberOf findPosts
*
- * @returns {void}
+ * @return {void}
*/
close: function() {
$('#find-posts-response').empty();
@@ -81,7 +81,7 @@
*
* @memberOf findPosts
*
- * @returns {void}
+ * @return {void}
*/
overlay: function() {
$( '.ui-find-overlay' ).on( 'click', function () {
@@ -100,7 +100,7 @@
*
* @memberOf findPosts
*
- * @returns {void}
+ * @return {void}
*/
send: function() {
var post = {
@@ -138,7 +138,7 @@
* Initializes the file once the DOM is fully loaded and attaches events to the
* various form elements.
*
- * @returns {void}
+ * @return {void}
*/
$( document ).ready( function() {
var settings, $mediaGridWrap = $( '#wp-media-grid' );
@@ -198,7 +198,7 @@
/**
* Enables clicking on the entire table row.
*
- * @returns {void}
+ * @return {void}
*/
$( '.find-box-inside' ).on( 'click', 'tr', function() {
$( this ).find( '.found-radio input' ).prop( 'checked', true );
diff --git a/src/js/_enqueues/admin/post.js b/src/js/_enqueues/admin/post.js
index ec1a0d718a..d2e956b4e4 100644
--- a/src/js/_enqueues/admin/post.js
+++ b/src/js/_enqueues/admin/post.js
@@ -35,7 +35,7 @@ window.wp = window.wp || {};
*
* @param {int} total Total number of comments for this post.
* @param {int} num Optional. Number of comments to fetch, defaults to 20.
- * @returns {boolean} Always returns false.
+ * @return {boolean} Always returns false.
*/
get : function(total, num) {
var st = this.st, data;
@@ -599,7 +599,7 @@ jQuery(document).ready( function($) {
*
* @param {Object} s Taxonomy object which will be added.
*
- * @returns {Object}
+ * @return {Object}
*/
catAddBefore = function( s ) {
if ( !$('#new'+taxonomy).val() ) {
@@ -620,7 +620,7 @@ jQuery(document).ready( function($) {
* @param {Object} r Response.
* @param {Object} s Taxonomy data.
*
- * @returns void
+ * @return {void}
*/
catAddAfter = function( r, s ) {
var sup, drop = $('#new'+taxonomy+'_parent');
@@ -666,7 +666,7 @@ jQuery(document).ready( function($) {
*
* @param {Object} s Request object.
*
- * @returns {Object} Data modified with post_ID attached.
+ * @return {Object} Data modified with post_ID attached.
*/
addBefore: function( s ) {
s.data += '&post_id=' + $('#post_ID').val();
@@ -695,7 +695,7 @@ jQuery(document).ready( function($) {
*
* @ignore
*
- * @returns void
+ * @return {void}
*/
updateVisibility = function() {
// Show sticky for public posts.
@@ -719,7 +719,7 @@ jQuery(document).ready( function($) {
*
* @ignore
*
- * @returns {boolean} False when an invalid timestamp has been selected, otherwise True.
+ * @return {boolean} False when an invalid timestamp has been selected, otherwise True.
*/
updateText = function() {
@@ -941,7 +941,7 @@ jQuery(document).ready( function($) {
*
* @global
*
- * @returns void
+ * @return {void}
*/
function editPermalink() {
var i, slug_value,
@@ -1051,7 +1051,7 @@ jQuery(document).ready( function($) {
*
* @global
*
- * @returns void
+ * @return {void}
*/
window.wptitlehint = function( id ) {
id = id || 'title';
diff --git a/src/js/_enqueues/admin/postbox.js b/src/js/_enqueues/admin/postbox.js
index 88facb1aee..9789518b65 100644
--- a/src/js/_enqueues/admin/postbox.js
+++ b/src/js/_enqueues/admin/postbox.js
@@ -35,7 +35,7 @@
* @memberof postboxes
* @fires postboxes#postbox-toggled
*
- * @returns {void}
+ * @return {void}
*/
handle_click : function () {
var $el = $( this ),
@@ -96,7 +96,7 @@
* @param {Object} [args]
* @param {Function} args.pbshow A callback that is called when a postbox opens.
* @param {Function} args.pbhide A callback that is called when a postbox closes.
- * @returns {void}
+ * @return {void}
*/
add_postbox_toggles : function (page, args) {
var $handles = $( '.postbox .hndle, .postbox .handlediv' );
@@ -121,7 +121,7 @@
*
* @since 3.2.0
*
- * @returns {void}
+ * @return {void}
*/
$( '.postbox a.dismiss' ).on( 'click.postboxes', function( e ) {
var hide_id = $(this).parents('.postbox').attr('id') + '-hide';
@@ -140,7 +140,7 @@
*
* @fires postboxes#postbox-toggled
*
- * @returns {void}
+ * @return {void}
*/
$('.hide-postbox-tog').bind('click.postboxes', function() {
var $el = $(this),
@@ -174,7 +174,7 @@
*
* @since 2.8.0
*
- * @returns {void}
+ * @return {void}
*/
$('.columns-prefs input[type="radio"]').bind('click.postboxes', function(){
var n = parseInt($(this).val(), 10);
@@ -198,7 +198,7 @@
* @param {Function} args.pbhide A callback that is called when a postbox
* closes.
*
- * @returns {void}
+ * @return {void}
*/
init : function(page, args) {
var isMobile = $( document.body ).hasClass( 'mobile' ),
@@ -275,7 +275,7 @@
* @memberof postboxes
*
* @param {string} page The page we are currently on.
- * @returns {void}
+ * @return {void}
*/
save_state : function(page) {
var closed, hidden;
@@ -306,7 +306,7 @@
* @memberof postboxes
*
* @param {string} page The page we are currently on.
- * @returns {void}
+ * @return {void}
*/
save_order : function(page) {
var postVars, page_columns = $('.columns-prefs input:checked').val() || 0;
@@ -336,7 +336,7 @@
* @memberof postboxes
* @access private
*
- * @returns {void}
+ * @return {void}
*/
_mark_area : function() {
var visible = $('div.postbox:visible').length, side = $('#post-body #side-sortables');
@@ -370,7 +370,7 @@
* @access private
*
* @param {number} n The amount of columns to divide the post edit page in.
- * @returns {void}
+ * @return {void}
*/
_pb_edit : function(n) {
var el = $('.metabox-holder').get(0);
@@ -398,7 +398,7 @@
* @memberof postboxes
* @access private
*
- * @returns {void}
+ * @return {void}
*/
_pb_change : function() {
var check = $( 'label.columns-prefs-1 input[type="radio"]' );
diff --git a/src/js/_enqueues/admin/tags-suggest.js b/src/js/_enqueues/admin/tags-suggest.js
index 866d7d0603..50075a654b 100644
--- a/src/js/_enqueues/admin/tags-suggest.js
+++ b/src/js/_enqueues/admin/tags-suggest.js
@@ -31,7 +31,7 @@
* @since 4.7.0
*
* @param {object} options Options that are passed to UI Autocomplete. Can be used to override the default settings.
- * @returns {object} jQuery instance.
+ * @return {object} jQuery instance.
*/
$.fn.wpTagsSuggest = function( options ) {
var cache;
diff --git a/src/js/_enqueues/admin/tags.js b/src/js/_enqueues/admin/tags.js
index a36b2ebb4f..df5b3f7e5d 100644
--- a/src/js/_enqueues/admin/tags.js
+++ b/src/js/_enqueues/admin/tags.js
@@ -20,7 +20,7 @@ jQuery(document).ready(function($) {
*
* @since 2.8.0
*
- * @returns boolean Always returns false to cancel the default event handling.
+ * @return {boolean} Always returns false to cancel the default event handling.
*/
$( '#the-list' ).on( 'click', '.delete-tag', function() {
var t = $(this), tr = t.parents('tr'), r = true, data;
@@ -37,7 +37,7 @@ jQuery(document).ready(function($) {
*
* @param {string} r The response from the server.
*
- * @returns {void}
+ * @return {void}
*/
$.post(ajaxurl, data, function(r){
if ( '1' == r ) {
@@ -75,7 +75,7 @@ jQuery(document).ready(function($) {
*
* @since 4.8.0
*
- * @returns {void}
+ * @return {void}
*/
$( '#edittag' ).on( 'click', '.delete', function( e ) {
if ( 'undefined' === typeof showNotice ) {
@@ -96,7 +96,7 @@ jQuery(document).ready(function($) {
*
* @since 2.8.0
*
- * @returns boolean Always returns false to cancel the default event handling.
+ * @return {boolean} Always returns false to cancel the default event handling.
*/
$('#submit').click(function(){
var form = $(this).parents('form');
@@ -117,7 +117,7 @@ jQuery(document).ready(function($) {
*
* @param {string} r The response from the server.
*
- * @returns {void}
+ * @return {void}
*/
$.post(ajaxurl, $('#addtag').serialize(), function(r){
var res, parent, term, indent, i;
diff --git a/src/js/_enqueues/lib/color-picker.js b/src/js/_enqueues/lib/color-picker.js
index 5206e39f1d..0a99ae00cc 100644
--- a/src/js/_enqueues/lib/color-picker.js
+++ b/src/js/_enqueues/lib/color-picker.js
@@ -39,7 +39,7 @@
*
* @access private
*
- * @returns {void}
+ * @return {void}
*/
_createHueOnly: function() {
var self = this,
@@ -65,7 +65,7 @@
* @param {Event} event The event that's being called.
* @param {HTMLElement} ui The HTMLElement containing the color picker.
*
- * @returns {void}
+ * @return {void}
*/
change: function( event, ui ) {
if ( $.isFunction( self.options.change ) ) {
@@ -83,7 +83,7 @@
*
* @access private
*
- * @returns {void}
+ * @return {void}
*/
_create: function() {
// Return early if Iris support is missing.
@@ -186,7 +186,7 @@
* @param {Event} event The event that's being called.
* @param {HTMLElement} ui The HTMLElement containing the color picker.
*
- * @returns {void}
+ * @return {void}
*/
change: function( event, ui ) {
self.toggler.css( { backgroundColor: ui.color.toString() } );
@@ -212,7 +212,7 @@
*
* @access private
*
- * @returns {void}
+ * @return {void}
*/
_addListeners: function() {
var self = this;
@@ -224,7 +224,7 @@
*
* @param {Event} event The event that's being called.
*
- * @returs {void}
+ * @return {void}
*/
self.wrap.on( 'click.wpcolorpicker', function( event ) {
event.stopPropagation();
@@ -233,7 +233,7 @@
/**
* Open or close the color picker depending on the class.
*
- * @since 3.5
+ * @since 3.5.0
*/
self.toggler.click( function(){
if ( self.toggler.hasClass( 'wp-picker-open' ) ) {
@@ -251,7 +251,7 @@
*
* @param {Event} event The event that's being called.
*
- * @returns {void}
+ * @return {void}
*/
self.element.change( function( event ) {
var me = $( this ),
@@ -273,7 +273,7 @@
*
* @param {Event} event The event that's being called.
*
- * @returns {void}
+ * @return {void}
*/
self.button.click( function( event ) {
var me = $( this );
@@ -293,7 +293,7 @@
*
* @since 3.5.0
*
- * @returns {void}
+ * @return {void}
*/
open: function() {
this.element.iris( 'toggle' );
@@ -309,7 +309,7 @@
*
* @since 3.5.0
*
- * @returns {void}
+ * @return {void}
*/
close: function() {
this.element.iris( 'toggle' );
@@ -327,7 +327,7 @@
*
* @since 3.5.0
*
- * @returns {string} The element's color.
+ * @return {string} The element's color.
*/
color: function( newColor ) {
if ( newColor === undef ) {
@@ -343,7 +343,7 @@
*
* @since 3.5.0
*
- * @returns {boolean|string} The element's color.
+ * @return {boolean|string} The element's color.
*/
defaultColor: function( newDefaultColor ) {
if ( newDefaultColor === undef ) {
diff --git a/src/js/_enqueues/lib/image-edit.js b/src/js/_enqueues/lib/image-edit.js
index 100f26e7e0..756d2e4da1 100644
--- a/src/js/_enqueues/lib/image-edit.js
+++ b/src/js/_enqueues/lib/image-edit.js
@@ -76,7 +76,7 @@
* The function is sometimes called with a 0 or 1
* instead of true or false.
*
- * @returns {void}
+ * @return {void}
*/
setDisabled : function( el, s ) {
/*
@@ -100,7 +100,7 @@
*
* @param {number} postid The post id.
*
- * @returns {void}
+ * @return {void}
*/
init : function(postid) {
var t = this, old = $('#image-editor-' + t.postid),
@@ -144,7 +144,7 @@
* @param {number} postid The post id.
* @param {number} toggle Is 0 or 1, fades the icon in then 1 and out when 0.
*
- * @returns {void}
+ * @return {void}
*/
toggleEditor : function(postid, toggle) {
var wait = $('#imgedit-wait-' + postid);
@@ -164,7 +164,7 @@
*
* @param {HTMLElement} el The element to create the help window in.
*
- * @returns {boolean} Always returns false.
+ * @return {boolean} Always returns false.
*/
toggleHelp : function(el) {
var $el = $( el );
@@ -186,8 +186,8 @@
*
* @param {number} postid The post id.
*
- * @returns {string} The value from the imagedit-save-target input field when available,
- * or 'full' when not available.
+ * @return {string} The value from the imagedit-save-target input field when available,
+ * or 'full' when not available.
*/
getTarget : function(postid) {
return $('input[name="imgedit-target-' + postid + '"]:checked', '#imgedit-save-target-' + postid).val() || 'full';
@@ -206,7 +206,7 @@
* and 1 when applicable for the x-axis.
* @param {jQuery} el Element.
*
- * @returns {void}
+ * @return {void}
*/
scaleChanged : function( postid, x, el ) {
var w = $('#imgedit-scale-width-' + postid), h = $('#imgedit-scale-height-' + postid),
@@ -239,7 +239,7 @@
*
* @param {number} postid The post id.
*
- * @returns {string} The aspect ratio.
+ * @return {string} The aspect ratio.
*/
getSelRatio : function(postid) {
var x = this.hold.w, y = this.hold.h,
@@ -267,7 +267,7 @@
* @param {number} postid The post id.
* @param {number} setSize 0 or 1, when 1 the image resets to its original size.
*
- * @returns {string} JSON string containing the history or an empty string if no history exists.
+ * @return {string} JSON string containing the history or an empty string if no history exists.
*/
filterHistory : function(postid, setSize) {
// Apply undo state to history.
@@ -333,7 +333,7 @@
* @param {string} nonce The nonce to verify the request.
* @param {function} callback Function to execute when the image is loaded.
*
- * @returns {void}
+ * @return {void}
*/
refreshEditor : function(postid, nonce, callback) {
var t = this, data, img;
@@ -407,10 +407,10 @@
* @param {string} action The action to perform on the image.
* The possible actions are: "scale" and "restore".
*
- * @returns {boolean|void} Executes a post request that refreshes the page
- * when the action is performed.
- * Returns false if a invalid action is given,
- * or when the action cannot be performed.
+ * @return {boolean|void} Executes a post request that refreshes the page
+ * when the action is performed.
+ * Returns false if a invalid action is given,
+ * or when the action cannot be performed.
*/
action : function(postid, nonce, action) {
var t = this, data, w, h, fw, fh;
@@ -472,9 +472,9 @@
* @param {number} postid The post id to get the image from the database.
* @param {string} nonce The nonce to verify the request.
*
- * @returns {boolean|void} If the actions are successfully saved a response message is shown.
- * Returns false if there is no image editing history,
- * thus there are not edit-actions performed on the image.
+ * @return {boolean|void} If the actions are successfully saved a response message is shown.
+ * Returns false if there is no image editing history,
+ * thus there are not edit-actions performed on the image.
*/
save : function(postid, nonce) {
var data,
@@ -538,8 +538,8 @@
* @param {string} nonce The nonce to verify the request.
* @param {object} view The image editor view to be used for the editing.
*
- * @returns {void|promise} Either returns void if the button was already activated
- * or returns an instance of the image editor, wrapped in a promise.
+ * @return {void|promise} Either returns void if the button was already activated
+ * or returns an instance of the image editor, wrapped in a promise.
*/
open : function( postid, nonce, view ) {
this._view = view;
@@ -593,7 +593,7 @@
*
* @param {number} postid The post id.
*
- * @returns {void}
+ * @return {void}
*/
imgLoaded : function(postid) {
var img = $('#image-preview-' + postid), parent = $('#imgedit-crop-' + postid);
@@ -621,7 +621,7 @@
* @param {HTMLElement} image The preview image.
* @param {HTMLElement} parent The preview image container.
*
- * @returns {void}
+ * @return {void}
*/
initCrop : function(postid, image, parent) {
var t = this,
@@ -653,7 +653,7 @@
/**
* Binds mouse down event to the cropping container.
*
- * @returns {void}
+ * @return {void}
*/
parent.children().on( 'mousedown, touchstart', function(e){
var ratio = false, sel, defRatio;
@@ -675,7 +675,7 @@
*
* @ignore
*
- * @returns {void}
+ * @return {void}
*/
onSelectStart: function() {
imageEdit.setDisabled($('#imgedit-crop-sel-' + postid), 1);
@@ -688,7 +688,7 @@
* @param {object} img jQuery object representing the image.
* @param {object} c The selection.
*
- * @returns {object}
+ * @return {object}
*/
onSelectEnd: function(img, c) {
imageEdit.setCropSelection(postid, c);
@@ -702,7 +702,7 @@
* @param {object} img jQuery object representing the image.
* @param {object} c The selection.
*
- * @returns {void}
+ * @return {void}
*/
onSelectChange: function(img, c) {
var sizer = imageEdit.hold.sizer;
@@ -721,7 +721,7 @@
* @param {number} postid The post id.
* @param {object} c The selection.
*
- * @returns {boolean}
+ * @return {boolean}
*/
setCropSelection : function(postid, c) {
var sel;
@@ -752,7 +752,7 @@
* @param {number} postid The post id.
* @param {bool} warn Warning message.
*
- * @returns {void|bool} Returns false if there is a warning.
+ * @return {void|bool} Returns false if there is a warning.
*/
close : function(postid, warn) {
warn = warn || false;
@@ -792,7 +792,7 @@
*
* @param {number} postid The post id.
*
- * @returns {boolean} Returns true if the history is not saved.
+ * @return {boolean} Returns true if the history is not saved.
*/
notsaved : function(postid) {
var h = $('#imgedit-history-' + postid).val(),
@@ -818,7 +818,7 @@
* @param {number} postid The post id.
* @param {string} nonce The nonce.
*
- * @returns {void}
+ * @return {void}
*/
addStep : function(op, postid, nonce) {
var t = this, elem = $('#imgedit-history-' + postid),
@@ -852,7 +852,7 @@
* @param {string} nonce The nonce.
* @param {object} t The target element.
*
- * @returns {boolean}
+ * @return {boolean}
*/
rotate : function(angle, postid, nonce, t) {
if ( $(t).hasClass('disabled') ) {
@@ -873,7 +873,7 @@
* @param {string} nonce The nonce.
* @param {object} t The target element.
*
- * @returns {boolean}
+ * @return {boolean}
*/
flip : function (axis, postid, nonce, t) {
if ( $(t).hasClass('disabled') ) {
@@ -893,7 +893,7 @@
* @param {string} nonce The nonce.
* @param {object} t The target object.
*
- * @returns {void|boolean} Returns false if the crop button is disabled.
+ * @return {void|boolean} Returns false if the crop button is disabled.
*/
crop : function (postid, nonce, t) {
var sel = $('#imgedit-selection-' + postid).val(),
@@ -921,7 +921,7 @@
* @param {number} postid The post id.
* @param {string} nonce The nonce.
*
- * @returns {void|false} Returns false if the undo button is disabled.
+ * @return {void|false} Returns false if the undo button is disabled.
*/
undo : function (postid, nonce) {
var t = this, button = $('#image-undo-' + postid), elem = $('#imgedit-undone-' + postid),
@@ -954,7 +954,7 @@
* @param {number} postid The post id.
* @param {string} nonce The nonce.
*
- * @returns {void}
+ * @return {void}
*/
redo : function(postid, nonce) {
var t = this, button = $('#image-redo-' + postid), elem = $('#imgedit-undone-' + postid),
@@ -984,9 +984,9 @@
* @param {number} postid The post id.
* @param {jQuery} el The element containing the values.
*
- * @returns {void|boolean} Returns false when the x or y value is lower than 1,
- * void when the value is not numeric or when the operation
- * is successful.
+ * @return {void|boolean} Returns false when the x or y value is lower than 1,
+ * void when the value is not numeric or when the operation
+ * is successful.
*/
setNumSelection : function( postid, el ) {
var sel, elX = $('#imgedit-sel-width-' + postid), elY = $('#imgedit-sel-height-' + postid),
@@ -1040,7 +1040,7 @@
*
* @param {number} num The number.
*
- * @returns {number} The number rounded to a whole number.
+ * @return {number} The number rounded to a whole number.
*/
round : function(num) {
var s;
@@ -1071,7 +1071,7 @@
* @param {number} n The ratio to set.
* @param {jQuery} el The element containing the values.
*
- * @returns {void}
+ * @return {void}
*/
setRatioSelection : function(postid, n, el) {
var sel, r, x = this.intval( $('#imgedit-crop-width-' + postid).val() ),
@@ -1113,8 +1113,8 @@
*
* @param {jQuery} el The html element.
*
- * @returns {void|boolean} Returns false if the value is not numeric,
- * void when it is.
+ * @return {void|boolean} Returns false if the value is not numeric,
+ * void when it is.
*/
validateNumeric: function( el ) {
if ( ! this.intval( $( el ).val() ) ) {
diff --git a/src/js/_enqueues/lib/lists.js b/src/js/_enqueues/lib/lists.js
index 59170bb7b4..cb0fc393c2 100644
--- a/src/js/_enqueues/lib/lists.js
+++ b/src/js/_enqueues/lib/lists.js
@@ -113,7 +113,7 @@ wpList = {
* @param {object} settings Settings for the current list.
* @param {string} action The type of action to perform: 'add', 'delete', or 'dim'.
* @param {string} backgroundColor Background color of the list's DOM element.
- * @returns {boolean} Whether to proceed with the action or not.
+ * @return {boolean} Whether to proceed with the action or not.
*/
confirm: null,
@@ -124,7 +124,7 @@ wpList = {
*
* @callback wpList~addBefore
* @param {object} settings Settings for the Ajax request.
- * @returns {object|boolean} Settings for the Ajax request or false to abort.
+ * @return {object|boolean} Settings for the Ajax request or false to abort.
*/
addBefore: null,
@@ -149,7 +149,7 @@ wpList = {
* @callback wpList~delBefore
* @param {object} settings Settings for the Ajax request.
* @param {HTMLElement} list The list DOM element.
- * @returns {object|boolean} Settings for the Ajax request or false to abort.
+ * @return {object|boolean} Settings for the Ajax request or false to abort.
*/
delBefore: null,
@@ -173,7 +173,7 @@ wpList = {
*
* @callback wpList~dimBefore
* @param {object} settings Settings for the Ajax request.
- * @returns {object|boolean} Settings for the Ajax request or false to abort.
+ * @return {object|boolean} Settings for the Ajax request or false to abort.
*/
dimBefore: null,
@@ -203,7 +203,7 @@ wpList = {
*
* @param {jQuery} element Element that triggered the request.
* @param {object} settings Settings for the Ajax request.
- * @returns {string|number} Nonce
+ * @return {string|number} Nonce
*/
nonce: function( element, settings ) {
var url = wpAjax.unserialize( element.attr( 'href' ) ),
@@ -237,7 +237,7 @@ wpList = {
*
* @param {HTMLElement} element The DOM element.
* @param {string} type The type of data to look for: 'list', 'add', 'delete', or 'dim'.
- * @returns {Array} Extracted list item data.
+ * @return {Array} Extracted list item data.
*/
parseData: function( element, type ) {
var data = [], wpListsData;
@@ -260,7 +260,7 @@ wpList = {
* @param {HTMLElement} list The DOM element.
* @param {object} settings Settings for this list.
* @param {string} action The type of action to perform: 'add', 'delete', or 'dim'.
- * @returns {object|boolean} Settings if confirmed, false if not.
+ * @return {object|boolean} Settings if confirmed, false if not.
*/
pre: function( list, settings, action ) {
var $element, backgroundColor, confirmed;
@@ -298,7 +298,7 @@ wpList = {
*
* @param {HTMLElement} element The DOM element.
* @param {object} settings Settings for this list.
- * @returns {boolean} Whether the item was added.
+ * @return {boolean} Whether the item was added.
*/
ajaxAdd: function( element, settings ) {
var list = this,
@@ -400,7 +400,7 @@ wpList = {
*
* @param {HTMLElement} element A DOM element containing item data.
* @param {object} settings Settings for this list.
- * @returns {boolean} Whether the item was deleted.
+ * @return {boolean} Whether the item was deleted.
*/
ajaxDel: function( element, settings ) {
var list = this,
@@ -487,7 +487,7 @@ wpList = {
*
* @param {HTMLElement} element A DOM element containing item data.
* @param {object} settings Settings for this list.
- * @returns {boolean} Whether the item was dim'ed.
+ * @return {boolean} Whether the item was dim'ed.
*/
ajaxDim: function( element, settings ) {
var list = this,
@@ -611,7 +611,7 @@ wpList = {
* Returns the background color of the passed element.
*
* @param {jQuery|string} element Element to check.
- * @returns {string} Background color value in HEX. Default: '#ffffff'.
+ * @return {string} Background color value in HEX. Default: '#ffffff'.
*/
getColor: function( element ) {
return $( element ).css( 'backgroundColor' ) || '#ffffff';
@@ -622,7 +622,7 @@ wpList = {
*
* @param {HTMLElement} element A DOM element containing item data.
* @param {object} settings Settings for this list.
- * @returns {boolean} Whether the item was added.
+ * @return {boolean} Whether the item was added.
*/
add: function( element, settings ) {
var $list = $( this ),
@@ -835,7 +835,7 @@ wpList = {
* Default: null.
* @param {wpList~dimBefore} settings.dimBefore Callback that's run before an item gets dim'd. Default: null.
* @param {wpList~dimAfter} settings.dimAfter Callback that's run after an item got dim'd. Default: null.
- * @returns {$.fn} wpList API function.
+ * @return {$.fn} wpList API function.
*/
$.fn.wpList = function( settings ) {
this.each( function( index, list ) {
diff --git a/src/js/_enqueues/vendor/mediaelement/wp-mediaelement.js b/src/js/_enqueues/vendor/mediaelement/wp-mediaelement.js
index dbeed1f5d5..fa8d3081af 100644
--- a/src/js/_enqueues/vendor/mediaelement/wp-mediaelement.js
+++ b/src/js/_enqueues/vendor/mediaelement/wp-mediaelement.js
@@ -16,7 +16,7 @@
*
* @since 4.4.0
*
- * @returns {void}
+ * @return {void}
*/
function initialize() {
if ( typeof _wpmejsSettings !== 'undefined' ) {
@@ -54,7 +54,7 @@
*
* @param {object} media The wrapper that mimics all the native events/properties/methods for all renderers.
* @param {object} node The original HTML video, audio, or iframe tag where the media was loaded.
- * @returns {string}
+ * @return {string}
*/
settings.customError = function ( media, node ) {
// Make sure we only fall back to a download link for flash files.
diff --git a/src/js/_enqueues/vendor/mediaelement/wp-playlist.js b/src/js/_enqueues/vendor/mediaelement/wp-playlist.js
index 81c7da6c42..0cde98eee3 100644
--- a/src/js/_enqueues/vendor/mediaelement/wp-playlist.js
+++ b/src/js/_enqueues/vendor/mediaelement/wp-playlist.js
@@ -177,7 +177,7 @@
* Only initializes new playlists not previously-initialized.
*
* @since 4.9.3
- * @returns {void}
+ * @return {void}
*/
function initialize() {
$( '.wp-playlist:not(:has(.mejs-container))' ).each( function() {
diff --git a/src/js/_enqueues/wp/a11y.js b/src/js/_enqueues/wp/a11y.js
index 648b629d37..3869dd3c3d 100644
--- a/src/js/_enqueues/wp/a11y.js
+++ b/src/js/_enqueues/wp/a11y.js
@@ -21,7 +21,7 @@ window.wp = window.wp || {};
* @param {String} message The message to be announced by Assistive Technologies.
* @param {String} [ariaLive] The politeness level for aria-live. Possible values:
* polite or assertive. Default polite.
- * @returns {void}
+ * @return {void}
*/
function speak( message, ariaLive ) {
// Clear previous messages to allow repeated strings being read out.
diff --git a/src/js/_enqueues/wp/api.js b/src/js/_enqueues/wp/api.js
index e5aeac6e4c..cbd3d4bc6b 100644
--- a/src/js/_enqueues/wp/api.js
+++ b/src/js/_enqueues/wp/api.js
@@ -835,7 +835,7 @@
* @param {string} method.
* @param {Backbone.Model} model.
* @param {{beforeSend}, *} options.
- * @returns {*}.
+ * @return {*}.
*/
sync: function( method, model, options ) {
var beforeSend;
@@ -988,7 +988,7 @@
* @param {string} method.
* @param {Backbone.Model} model.
* @param {{success}, *} options.
- * @returns {*}.
+ * @return {*}.
*/
sync: function( method, model, options ) {
var beforeSend, success,
@@ -1063,7 +1063,7 @@
* Fetches the next page of objects if a new page exists.
*
* @param {data: {page}} options.
- * @returns {*}.
+ * @return {*}.
*/
more: function( options ) {
options = options || {};
@@ -1089,7 +1089,7 @@
/**
* Returns true if there are more pages of objects available.
*
- * @returns null|boolean.
+ * @return {null|boolean}
*/
hasMore: function() {
if ( null === this.state.totalPages ||
diff --git a/src/js/_enqueues/wp/autosave.js b/src/js/_enqueues/wp/autosave.js
index c28e48a780..a96ea97bf9 100644
--- a/src/js/_enqueues/wp/autosave.js
+++ b/src/js/_enqueues/wp/autosave.js
@@ -23,7 +23,7 @@ window.autosave = function() {
*
* @since 3.9.0
*
- * @returns {Object}
+ * @return {Object}
* {{
* getPostData: getPostData,
* getCompareString: getCompareString,
@@ -46,7 +46,7 @@ window.autosave = function() {
*
* @param {string} type The type of autosave either local or remote.
*
- * @returns {Object} Object containing the post data.
+ * @return {Object} Object containing the post data.
*/
function getPostData( type ) {
var post_name, parent_id, data,
@@ -110,7 +110,7 @@ window.autosave = function() {
*
* @param {Object} postData The object containing the post data.
*
- * @returns {string} A concatenated string with title, content and excerpt.
+ * @return {string} A concatenated string with title, content and excerpt.
*/
function getCompareString( postData ) {
if ( typeof postData === 'object' ) {
@@ -125,7 +125,7 @@ window.autosave = function() {
*
* @since 3.9.0
*
- * @returns {void}
+ * @return {void}
*/
function disableButtons() {
$document.trigger('autosave-disable-buttons');
@@ -139,7 +139,7 @@ window.autosave = function() {
*
* @since 3.9.0
*
- * @returns {void}
+ * @return {void}
*/
function enableButtons() {
$document.trigger( 'autosave-enable-buttons' );
@@ -150,8 +150,8 @@ window.autosave = function() {
*
* @since 4.6.0
*
- * @returns {boolean|*} Returns either false if the editor is undefined,
- * or the instance of the content editor.
+ * @return {boolean|*} Returns either false if the editor is undefined,
+ * or the instance of the content editor.
*/
function getEditor() {
return typeof tinymce !== 'undefined' && tinymce.get('content');
@@ -162,7 +162,7 @@ window.autosave = function() {
*
* @since 3.9.0
*
- * @returns {
+ * @return {
* {
* hasStorage: *,
* getSavedPostData: getSavedPostData,
@@ -183,7 +183,7 @@ window.autosave = function() {
*
* @since 3.9.0
*
- * @returns {boolean} True if the sessionStorage is supported and enabled.
+ * @return {boolean} True if the sessionStorage is supported and enabled.
*/
function checkStorage() {
var test = Math.random().toString(),
@@ -204,8 +204,8 @@ window.autosave = function() {
*
* @since 3.9.0
*
- * @returns {boolean|Object} False if no sessionStorage in the browser or an Object
- * containing all postData for this blog.
+ * @return {boolean|Object} False if no sessionStorage in the browser or an Object
+ * containing all postData for this blog.
*/
function getStorage() {
var stored_obj = false;
@@ -229,7 +229,7 @@ window.autosave = function() {
*
* @since 3.9.0
*
- * @returns {boolean} True if the data was saved successfully, false if it wasn't saved.
+ * @return {boolean} True if the data was saved successfully, false if it wasn't saved.
*/
function setStorage( stored_obj ) {
var key;
@@ -248,7 +248,7 @@ window.autosave = function() {
*
* @since 3.9.0
*
- * @returns {boolean|Object} False if no storage or no data or the postData as an Object.
+ * @return {boolean|Object} False if no storage or no data or the postData as an Object.
*/
function getSavedPostData() {
var stored = getStorage();
@@ -269,7 +269,7 @@ window.autosave = function() {
*
* @param {Object|boolean|null} stored_data The post data to store or null/false/empty to delete the key.
*
- * @returns {boolean} True if data is stored, false if data was removed.
+ * @return {boolean} True if data is stored, false if data was removed.
*/
function setData( stored_data ) {
var stored = getStorage();
@@ -294,7 +294,7 @@ window.autosave = function() {
*
* @since 3.9.0
*
- * @returns {void}
+ * @return {void}
*/
function suspend() {
isSuspended = true;
@@ -305,7 +305,7 @@ window.autosave = function() {
*
* @since 3.9.0
*
- * @returns {void}
+ * @return {void}
*/
function resume() {
isSuspended = false;
@@ -321,7 +321,7 @@ window.autosave = function() {
*
* @param {Object} data The post data for saving, minimum 'post_title' and 'content'.
*
- * @returns {boolean} Returns true when data has been saved, otherwise it returns false.
+ * @return {boolean} Returns true when data has been saved, otherwise it returns false.
*/
function save( data ) {
var postData, compareString,
@@ -370,7 +370,7 @@ window.autosave = function() {
*
* @since 3.9.0
*
- * @returns {void}
+ * @return {void}
*/
function run() {
post_id = $('#post_ID').val() || 0;
@@ -427,7 +427,7 @@ window.autosave = function() {
*
* @param {string} str1 The first string.
* @param {string} str2 The second string.
- * @returns {boolean} True if the strings are the same.
+ * @return {boolean} True if the strings are the same.
*/
function compare( str1, str2 ) {
function removeSpaces( string ) {
@@ -445,7 +445,7 @@ window.autosave = function() {
*
* @since 3.9.0
*
- * @returns {void}
+ * @return {void}
*/
function checkPost() {
var content, post_title, excerpt, $notice,
@@ -513,7 +513,7 @@ window.autosave = function() {
*
* @param {Object} postData The object containing all post data.
*
- * @returns {boolean} True if the post is restored.
+ * @return {boolean} True if the post is restored.
*/
function restorePost( postData ) {
var editor;
@@ -579,7 +579,7 @@ window.autosave = function() {
*
* @since 3.9.0
*
- * @returns {Object} {
+ * @return {Object} {
* {
* tempBlockSave: tempBlockSave,
* triggerSave: triggerSave,
@@ -600,7 +600,7 @@ window.autosave = function() {
*
* @since 3.9.0
*
- * @returns {void}
+ * @return {void}
*/
function tempBlockSave() {
_blockSave = true;
@@ -616,7 +616,7 @@ window.autosave = function() {
*
* @since 3.9.0
*
- * @returns {void}
+ * @return {void}
*/
function suspend() {
isSuspended = true;
@@ -627,7 +627,7 @@ window.autosave = function() {
*
* @since 3.9.0
*
- * @returns {void}
+ * @return {void}
*/
function resume() {
isSuspended = false;
@@ -640,7 +640,7 @@ window.autosave = function() {
*
* @param {Object} data The post data.
*
- * @returns {void}
+ * @return {void}
*/
function response( data ) {
_schedule();
@@ -664,7 +664,7 @@ window.autosave = function() {
*
* @since 3.9.0
*
- * @returns {void}
+ * @return {void}
*/
function triggerSave() {
nextRun = 0;
@@ -693,7 +693,7 @@ window.autosave = function() {
*
* @since 3.9.0
*
- * @returns {Object} Returns the post data.
+ * @return {Object} Returns the post data.
*/
function save() {
var postData, compareString;
@@ -739,7 +739,7 @@ window.autosave = function() {
*
* @since 3.9.0
*
- * @returns {void}
+ * @return {void}
*/
function _schedule() {
nextRun = ( new Date() ).getTime() + ( autosaveL10n.autosaveInterval * 1000 ) || 60000;
@@ -750,7 +750,7 @@ window.autosave = function() {
*
* @since 3.9.0
*
- * @returns {void}
+ * @return {void}
*/
$document.on( 'heartbeat-send.autosave', function( event, data ) {
var autosaveData = save();
@@ -765,7 +765,7 @@ window.autosave = function() {
*
* @since 3.9.0
*
- * @returns {void}
+ * @return {void}
*/
}).on( 'heartbeat-tick.autosave', function( event, data ) {
if ( data.wp_autosave ) {
@@ -776,7 +776,7 @@ window.autosave = function() {
*
* @since 3.9.0
*
- * @returns {void}
+ * @return {void}
*/
}).on( 'heartbeat-connection-lost.autosave', function( event, error, status ) {
@@ -797,7 +797,7 @@ window.autosave = function() {
*
* @since 3.9.0
*
- * @returns {void}
+ * @return {void}
*/
}).on( 'heartbeat-connection-restored.autosave', function() {
$('#lost-connection-notice').hide();
@@ -825,7 +825,7 @@ window.autosave = function() {
*
* @since 3.9.0
*
- * @returns {void}
+ * @return {void}
*/
$document.on( 'tinymce-editor-init.autosave', function( event, editor ) {
if ( editor.id === 'content' ) {
diff --git a/src/js/_enqueues/wp/code-editor.js b/src/js/_enqueues/wp/code-editor.js
index 25a21a5aeb..15906ff55b 100644
--- a/src/js/_enqueues/wp/code-editor.js
+++ b/src/js/_enqueues/wp/code-editor.js
@@ -44,7 +44,7 @@ if ( 'undefined' === typeof window.wp.codeEditor ) {
* @param {Function} settings.onChangeLintingErrors - Callback for when there are changes to linting errors.
* @param {Function} settings.onUpdateErrorNotice - Callback to update error notice.
*
- * @returns {void}
+ * @return {void}
*/
function configureLinting( editor, settings ) { // eslint-disable-line complexity
var currentErrorAnnotations = [], previouslyShownErrorAnnotations = [];
@@ -52,7 +52,7 @@ if ( 'undefined' === typeof window.wp.codeEditor ) {
/**
* Call the onUpdateErrorNotice if there are new errors to show.
*
- * @returns {void}
+ * @return {void}
*/
function updateErrorNotice() {
if ( settings.onUpdateErrorNotice && ! _.isEqual( currentErrorAnnotations, previouslyShownErrorAnnotations ) ) {
@@ -64,7 +64,7 @@ if ( 'undefined' === typeof window.wp.codeEditor ) {
/**
* Get lint options.
*
- * @returns {object} Lint options.
+ * @return {object} Lint options.
*/
function getLintOptions() { // eslint-disable-line complexity
var options = editor.getOption( 'lint' );
@@ -214,7 +214,7 @@ if ( 'undefined' === typeof window.wp.codeEditor ) {
* @param {Function} settings.onTabNext - Callback to handle tabbing to the next tabbable element.
* @param {Function} settings.onTabPrevious - Callback to handle tabbing to the previous tabbable element.
*
- * @returns {void}
+ * @return {void}
*/
function configureTabbing( codemirror, settings ) {
var $textarea = $( codemirror.getTextArea() );
@@ -273,7 +273,7 @@ if ( 'undefined' === typeof window.wp.codeEditor ) {
* @param {object} [settings.htmlhint] - Rules for HTMLHint.
* @param {object} [settings.jshint] - Rules for JSHint.
*
- * @returns {CodeEditorInstance} Instance.
+ * @return {CodeEditorInstance} Instance.
*/
wp.codeEditor.initialize = function initialize( textarea, settings ) {
var $textarea, codemirror, instanceSettings, instance;
diff --git a/src/js/_enqueues/wp/customize/base.js b/src/js/_enqueues/wp/customize/base.js
index 39aec0ad0c..353ecc62bb 100644
--- a/src/js/_enqueues/wp/customize/base.js
+++ b/src/js/_enqueues/wp/customize/base.js
@@ -482,7 +482,7 @@ window.wp = window.wp || {};
* For example:
* when( id1, id2, id3, function( value1, value2, value3 ) {} );
*
- * @returns $.Deferred.promise();
+ * @return $.Deferred.promise();
*/
when: function() {
var self = this,
@@ -876,7 +876,7 @@ window.wp = window.wp || {};
*
* @since 4.9.0
*
- * @returns {jQuery} Notification container element.
+ * @return {jQuery} Notification container element.
*/
render: function() {
var notification = this, container, data;
@@ -942,7 +942,7 @@ window.wp = window.wp || {};
* @alias wp.customize.utils.parseQueryString
*
* @param {string} queryString Query string.
- * @returns {object} Parsed query string.
+ * @return {object} Parsed query string.
*/
api.utils.parseQueryString = function parseQueryString( queryString ) {
var queryParams = {};
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,
diff --git a/src/js/_enqueues/wp/customize/nav-menus.js b/src/js/_enqueues/wp/customize/nav-menus.js
index fe58cb58da..309785d54c 100644
--- a/src/js/_enqueues/wp/customize/nav-menus.js
+++ b/src/js/_enqueues/wp/customize/nav-menus.js
@@ -387,7 +387,7 @@
*
* @param {Array.<object>} itemTypes List of objects containing type and key.
* @param {string} deprecated Formerly the object parameter.
- * @returns {void}
+ * @return {void}
*/
loadItems: function( itemTypes, deprecated ) {
var self = this, _itemTypes, requestItemTypes = [], params, request, itemTemplate, availableMenuItemContainers = {};
@@ -595,7 +595,7 @@
* @private
*
* @param {jQuery.Event} event Event.
- * @returns {void}
+ * @return {void}
*/
_submitNew: function( event ) {
var container;
@@ -621,7 +621,7 @@
* @private
*
* @param {jQuery} container
- * @returns {void}
+ * @return {void}
*/
submitNew: function( container ) {
var panel = this,
@@ -843,7 +843,7 @@
* @since 4.3.0
* @private
*
- * @returns {void}
+ * @return {void}
*/
saveManageColumnsState: _.debounce( function() {
var panel = this;
@@ -877,7 +877,7 @@
* @since 4.3.0
* @private
*
- * @returns {Array} Fields (columns) that are hidden.
+ * @return {Array} Fields (columns) that are hidden.
*/
hidden: function() {
return $( '.hide-column-tog' ).not( ':checked' ).map( function() {
@@ -973,7 +973,7 @@
* Update the active field class for the content container for a given checkbox toggle.
*
* @this {jQuery}
- * @returns {void}
+ * @return {void}
*/
handleFieldActiveToggle = function() {
var className = 'field-' + $( this ).val() + '-active';
@@ -1166,7 +1166,7 @@
*
* @since 4.9.0
*
- * @returns {void}
+ * @return {void}
*/
highlightNewItemButton: function() {
api.utils.highlightButton( this.contentContainer.find( '.add-new-menu-item' ), { delay: 2000 } );
@@ -1179,7 +1179,7 @@
* @since 4.9.0
*
* @param {string} [name=''] Nav menu name.
- * @returns {wp.customize.Menus.MenuSection} Added nav menu.
+ * @return {wp.customize.Menus.MenuSection} Added nav menu.
*/
api.Menus.createNavMenu = function createNavMenu( name ) {
var customizeId, placeholderId, setting;
@@ -1263,7 +1263,7 @@
* Get number of non-deleted nav menus.
*
* @since 4.9.0
- * @returns {number} Count.
+ * @return {number} Count.
*/
function getNavMenuCount() {
var count = 0;
@@ -1279,7 +1279,7 @@
* Update visibility of notice to prompt users to create menus.
*
* @since 4.9.0
- * @returns {void}
+ * @return {void}
*/
function updateNoticeVisibility() {
container.find( '.add-new-menu-notice' ).prop( 'hidden', getNavMenuCount() > 0 );
@@ -1290,7 +1290,7 @@
*
* @since 4.9.0
* @param {wp.customize.Setting} setting - Added setting.
- * @returns {void}
+ * @return {void}
*/
function addChangeEventListener( setting ) {
if ( navMenuSettingPattern.test( setting.id ) ) {
@@ -1304,7 +1304,7 @@
*
* @since 4.9.0
* @param {wp.customize.Setting} setting - Removed setting.
- * @returns {void}
+ * @return {void}
*/
function removeChangeEventListener( setting ) {
if ( navMenuSettingPattern.test( setting.id ) ) {
@@ -1439,7 +1439,7 @@
* @since 4.9.0
*
* @param {string|null} locationId - The ID of the location to select. `null` clears all selections.
- * @returns {void}
+ * @return {void}
*/
selectDefaultLocation: function( locationId ) {
var locationControl = api.control( this.id + '[locations]' ),
@@ -1870,7 +1870,7 @@
/**
*
- * @returns {number}
+ * @return {number}
*/
getDepth: function() {
var control = this, setting = control.setting(), depth = 0;
@@ -1962,7 +1962,7 @@
*
* @param {Boolean} expanded
* @param {Object} [params]
- * @returns {Boolean} False if state already applied.
+ * @return {Boolean} False if state already applied.
*/
_toggleExpanded: api.Section.prototype._toggleExpanded,
@@ -1970,7 +1970,7 @@
* @since 4.6.0
*
* @param {Object} [params]
- * @returns {Boolean} False if already expanded.
+ * @return {Boolean} False if already expanded.
*/
expand: api.Section.prototype.expand,
@@ -1990,7 +1990,7 @@
* @since 4.6.0
*
* @param {Object} [params]
- * @returns {Boolean} False if already collapsed.
+ * @return {Boolean} False if already collapsed.
*/
collapse: api.Section.prototype.collapse,
@@ -2428,7 +2428,7 @@
* @since 4.9.0
*
* @param {Object.<string,boolean>} selections - A map of location selections.
- * @returns {void}
+ * @return {void}
*/
setSelections: function( selections ) {
this.container.find( '.menu-location' ).each( function( i, checkboxNode ) {
@@ -2954,7 +2954,7 @@
* Add a new item to this menu.
*
* @param {object} item - Value for the nav_menu_item setting to be created.
- * @returns {wp.customize.Menus.controlConstructor.nav_menu_item} The newly-created nav_menu_item control instance.
+ * @return {wp.customize.Menus.controlConstructor.nav_menu_item} The newly-created nav_menu_item control instance.
*/
addItemToMenu: function( item ) {
var menuControl = this, customizeId, settingArgs, setting, menuItemControl, placeholderId, position = 0, priority = 10;
@@ -3373,7 +3373,7 @@
* @alias wp.customize.Menus~displayNavMenuName
*
* @param {string} name
- * @returns {string}
+ * @return {string}
*/
function displayNavMenuName( name ) {
name = name || '';
diff --git a/src/js/_enqueues/wp/customize/preview-nav-menus.js b/src/js/_enqueues/wp/customize/preview-nav-menus.js
index 696d71afbc..d9a7464016 100644
--- a/src/js/_enqueues/wp/customize/preview-nav-menus.js
+++ b/src/js/_enqueues/wp/customize/preview-nav-menus.js
@@ -134,7 +134,7 @@ wp.customize.navMenusPreview = wp.customize.MenusCustomizerPreview = ( function(
* @param {wp.customize.Value|string} setting - Object or ID.
* @param {number|object|false|null} newValue - New value, or null if the setting was just removed.
* @param {number|object|false|null} oldValue - Old value, or null if the setting was just added.
- * @returns {boolean}
+ * @return {boolean}
*/
isRelatedSetting: function( setting, newValue, oldValue ) {
var partial = this, navMenuLocationSetting, navMenuId, isNavMenuItemSetting, _newValue, _oldValue, urlParser;
@@ -210,7 +210,7 @@ wp.customize.navMenusPreview = wp.customize.MenusCustomizerPreview = ( function(
*
* @since 4.5.0
*
- * @returns {Promise}
+ * @return {Promise}
*/
refresh: function() {
var partial = this, menuId, deferred = $.Deferred();
diff --git a/src/js/_enqueues/wp/customize/preview-widgets.js b/src/js/_enqueues/wp/customize/preview-widgets.js
index f23cc6b212..f46456b28f 100644
--- a/src/js/_enqueues/wp/customize/preview-widgets.js
+++ b/src/js/_enqueues/wp/customize/preview-widgets.js
@@ -16,7 +16,7 @@
* @param {Object} wp Current WordPress environment instance.
* @param {Object} api Information from the API.
*
- * @returns {Object} Widget-related variables.
+ * @return {Object} Widget-related variables.
*/
wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function( $, _, wp, api ) {
@@ -42,7 +42,7 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
*
* @memberOf wp.customize.widgetsPreview
*
- * @returns {void}
+ * @return {void}
*/
self.init = function() {
var self = this;
@@ -124,7 +124,7 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
*
* @since 4.5.0
*
- * @returns {Promise|void} Either a promise postponing the refresh, or void.
+ * @return {Promise|void} Either a promise postponing the refresh, or void.
*/
refresh: function() {
var partial = this, refreshDeferred;
@@ -146,7 +146,7 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
* @param {wp.customize.selectiveRefresh.Placement} placement The placement
* function.
*
- * @returns {void}
+ * @return {void}
*/
renderContent: function( placement ) {
var partial = this;
@@ -205,7 +205,7 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
*
* @since 4.5.0
*
- * @returns {void}
+ * @return {void}
*/
ready: function() {
var sidebarPartial = this;
@@ -251,9 +251,9 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
*
* @since 4.5.0
*
- * @returns {Array.<{before: Comment, after: Comment, instanceNumber: number}>}
- * An array with an object for each sidebar instance, containing the
- * node before and after the sidebar instance and its instance number.
+ * @return {Array.<{before: Comment, after: Comment, instanceNumber: number}>}
+ * An array with an object for each sidebar instance, containing the
+ * node before and after the sidebar instance and its instance number.
*/
findDynamicSidebarBoundaryNodes: function() {
var partial = this, regExp, boundaryNodes = {}, recursiveCommentTraversal;
@@ -293,8 +293,8 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
*
* @since 4.5.0
*
- * @returns {Array} An array containing placement objects for each of the
- * dynamic sidebar boundary nodes.
+ * @return {Array} An array containing placement objects for each of the
+ * dynamic sidebar boundary nodes.
*/
placements: function() {
var partial = this;
@@ -320,7 +320,7 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
* @throws {Error} If the setting doesn't exist in the API.
* @throws {Error} If the API doesn't pass an array of widget ids.
*
- * @returns {Array} A shallow copy of the array containing widget IDs.
+ * @return {Array} A shallow copy of the array containing widget IDs.
*/
getWidgetIds: function() {
var sidebarPartial = this, settingId, widgetIds;
@@ -344,8 +344,8 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
*
* @since 4.5.0
*
- * @returns {Array.<wp.customize.selectiveRefresh.Placement>} List of placements
- * that were reflowed.
+ * @return {Array.<wp.customize.selectiveRefresh.Placement>} List of placements
+ * that were reflowed.
*/
reflowWidgets: function() {
var sidebarPartial = this, sidebarPlacements, widgetIds, widgetPartials, sortedSidebarContainers = [];
@@ -412,7 +412,7 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
*
* @param {string} widgetId The widget ID.
*
- * @returns {wp.customize.selectiveRefresh.Partial} The widget instance partial.
+ * @return {wp.customize.selectiveRefresh.Partial} The widget instance partial.
*/
ensureWidgetPlacementContainers: function( widgetId ) {
var sidebarPartial = this, widgetPartial, wasInserted = false, partialId = 'widget[' + widgetId + ']';
@@ -480,7 +480,7 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
* @param {Array} newWidgetIds New widget IDs.
* @param {Array} oldWidgetIds Old widget IDs.
*
- * @returns {void}
+ * @return {void}
*/
handleSettingChange: function( newWidgetIds, oldWidgetIds ) {
var sidebarPartial = this, needsRefresh, widgetsRemoved, widgetsAdded, addedWidgetPartials = [];
@@ -535,7 +535,7 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
*
* @since 4.5.0
*
- * @returns {Promise} A promise postponing the refresh.
+ * @return {Promise} A promise postponing the refresh.
*/
refresh: function() {
var partial = this, deferred = $.Deferred();
@@ -565,7 +565,7 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
*
* @since 4.5.0
*
- * @returns {void}
+ * @return {void}
*/
self.addPartials = function() {
_.each( self.registeredSidebars, function( registeredSidebar ) {
@@ -590,7 +590,7 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
*
* @since 3.9.0
*
- * @returns {void}
+ * @return {void}
*/
self.buildWidgetSelectors = function() {
var self = this;
@@ -633,7 +633,7 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
* @since 3.9.0
* @param {string} widgetId ID of the widget.
*
- * @returns {void}
+ * @return {void}
*/
self.highlightWidget = function( widgetId ) {
var $body = $( document.body ),
@@ -655,7 +655,7 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
*
* @since 3.9.0
*
- * @returns {void}
+ * @return {void}
*/
self.highlightControls = function() {
var self = this,
@@ -692,8 +692,8 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
*
* @param {string} widgetId The widget ID.
*
- * @returns {{idBase: string, number: number|null}} An object containing the
- * idBase and number of the parsed widget ID.
+ * @return {{idBase: string, number: number|null}} An object containing the idBase
+ * and number of the parsed widget ID.
*/
self.parseWidgetId = function( widgetId ) {
var matches, parsed = {
@@ -721,9 +721,9 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
*
* @param {string} settingId Widget setting ID.
*
- * @returns {{idBase: string, number: number|null}|null} Either an object
- * containing the idBase and number of the parsed widget setting ID, or
- * null.
+ * @return {{idBase: string, number: number|null}|null} Either an object containing the idBase
+ * and number of the parsed widget setting ID,
+ * or null.
*/
self.parseWidgetSettingId = function( settingId ) {
var matches, parsed = {
@@ -751,7 +751,7 @@ wp.customize.widgetsPreview = wp.customize.WidgetCustomizerPreview = (function(
*
* @param {string} widgetId The widget ID.
*
- * @returns {string} The setting ID.
+ * @return {string} The setting ID.
*/
self.getWidgetSettingId = function( widgetId ) {
var parsed = this.parseWidgetId( widgetId ), settingId;
diff --git a/src/js/_enqueues/wp/customize/preview.js b/src/js/_enqueues/wp/customize/preview.js
index 9bbbf2a084..12c641c080 100644
--- a/src/js/_enqueues/wp/customize/preview.js
+++ b/src/js/_enqueues/wp/customize/preview.js
@@ -28,7 +28,7 @@
* @access private
*
* @param {string} url URL.
- * @returns {string} URL with customized state.
+ * @return {string} URL with customized state.
*/
injectUrlWithState = function( url ) {
var urlParser, oldQueryParams, newQueryParams;
@@ -234,7 +234,7 @@
* @access protected
*
* @access private
- * @returns {void}
+ * @return {void}
*/
api.addLinkPreviewing = function addLinkPreviewing() {
var linkSelectors = 'a[href], area[href]';
@@ -278,7 +278,7 @@
* @param {string} element.host Host.
* @param {object} [options]
* @param {object} [options.allowAdminAjax=false] Allow admin-ajax.php requests.
- * @returns {boolean} Is appropriate for changeset link.
+ * @return {boolean} Is appropriate for changeset link.
*/
api.isLinkPreviewable = function isLinkPreviewable( element, options ) {
var matchesAllowedUrl, parsedAllowedUrl, args, elementHost;
@@ -332,7 +332,7 @@
* @param {string} element.search Query string.
* @param {string} element.host Host.
* @param {string} element.protocol Protocol.
- * @returns {void}
+ * @return {void}
*/
api.prepareLinkPreview = function prepareLinkPreview( element ) {
var queryParams, $element = $( element );
@@ -404,7 +404,7 @@
* @param {string} options.url URL.
* @param {object} originalOptions Original options.
* @param {XMLHttpRequest} xhr XHR.
- * @returns {void}
+ * @return {void}
*/
var prefilterAjax = function( options, originalOptions, xhr ) {
var urlParser, queryParams, requestMethod, dirtyValues = {};
@@ -470,7 +470,7 @@
* @since 4.7.0
* @access protected
*
- * @returns {void}
+ * @return {void}
*/
api.addFormPreviewing = function addFormPreviewing() {
@@ -502,7 +502,7 @@
* @access protected
*
* @param {HTMLFormElement} form Form.
- * @returns {void}
+ * @return {void}
*/
api.prepareFormPreview = function prepareFormPreview( form ) {
var urlParser, stateParams = {};
@@ -626,7 +626,7 @@
* Preview changes to custom logo.
*
* @param {number} attachmentId Attachment ID for custom logo.
- * @returns {void}
+ * @return {void}
*/
custom_logo: function( attachmentId ) {
$( 'body' ).toggleClass( 'wp-custom-logo', !! attachmentId );
@@ -636,7 +636,7 @@
* Preview changes to custom css.
*
* @param {string} value Custom CSS..
- * @returns {void}
+ * @return {void}
*/
custom_css: function( value ) {
$( '#wp-custom-css' ).text( value );
@@ -645,7 +645,7 @@
/**
* Preview changes to any of the background settings.
*
- * @returns {void}
+ * @return {void}
*/
background: function() {
var css = '', settings = {};
@@ -775,7 +775,7 @@
* Handle update to changeset UUID.
*
* @param {string} uuid - UUID.
- * @returns {void}
+ * @return {void}
*/
handleUpdatedChangesetUuid = function( uuid ) {
api.settings.changeset.uuid = uuid;
diff --git a/src/js/_enqueues/wp/customize/selective-refresh.js b/src/js/_enqueues/wp/customize/selective-refresh.js
index 82d0f9e8d6..ae9f9ffaf2 100644
--- a/src/js/_enqueues/wp/customize/selective-refresh.js
+++ b/src/js/_enqueues/wp/customize/selective-refresh.js
@@ -120,7 +120,7 @@ wp.customize.selectiveRefresh = ( function( $, api ) {
* @access public
*
* @param {Placement} placement The placement container element.
- * @returns {void}
+ * @return {void}
*/
createEditShortcutForPlacement: function( placement ) {
var partial = this, $shortcut, $placementContainer, illegalAncestorSelector, illegalContainerSelector;
@@ -150,7 +150,7 @@ wp.customize.selectiveRefresh = ( function( $, api ) {
*
* @param {Placement} placement The placement for the partial.
* @param {jQuery} $editShortcut The shortcut element as a jQuery object.
- * @returns {void}
+ * @return {void}
*/
addEditShortcutToPlacement: function( placement, $editShortcut ) {
var $placementContainer = $( placement.container );
@@ -408,7 +408,7 @@ wp.customize.selectiveRefresh = ( function( $, api ) {
* @param {Element|jQuery} [placement.container] - This param will be empty if there was no element matching the selector.
* @param {string|object|boolean} placement.addedContent - Rendered HTML content, a data object for JS templates to render, or false if no render.
* @param {object} [placement.context] - Optional context information about the container.
- * @returns {boolean} Whether the rendering was successful and the fallback was not invoked.
+ * @return {boolean} Whether the rendering was successful and the fallback was not invoked.
*/
renderContent: function( placement ) {
var partial = this, content, newContainerElement;
diff --git a/src/js/_enqueues/wp/customize/widgets.js b/src/js/_enqueues/wp/customize/widgets.js
index 5a0fbf2c3c..a2b800db72 100644
--- a/src/js/_enqueues/wp/customize/widgets.js
+++ b/src/js/_enqueues/wp/customize/widgets.js
@@ -1039,7 +1039,7 @@
* over when copying sanitized values over to the form loaded.
*
* @param {jQuery} container element in which to look for inputs
- * @returns {jQuery} inputs
+ * @return {jQuery} inputs
* @private
*/
_getInputs: function( container ) {
@@ -1051,7 +1051,7 @@
* This string can be used to compare whether or not the form has all of the same fields.
*
* @param {jQuery} inputs
- * @returns {string}
+ * @return {string}
* @private
*/
_getInputsSignature: function( inputs ) {
@@ -1074,7 +1074,7 @@
* Get the state for an input depending on its type.
*
* @param {jQuery|Element} input
- * @returns {string|boolean|array|*}
+ * @return {string|boolean|array|*}
* @private
*/
_getInputState: function( input ) {
@@ -1340,7 +1340,7 @@
*
* @param {Boolean} expanded
* @param {Object} [params]
- * @returns {Boolean} False if state already applied.
+ * @return {Boolean} False if state already applied.
*/
_toggleExpanded: api.Section.prototype._toggleExpanded,
@@ -1348,7 +1348,7 @@
* @since 4.1.0
*
* @param {Object} [params]
- * @returns {Boolean} False if already expanded.
+ * @return {Boolean} False if already expanded.
*/
expand: api.Section.prototype.expand,
@@ -1365,7 +1365,7 @@
* @since 4.1.0
*
* @param {Object} [params]
- * @returns {Boolean} False if already collapsed.
+ * @return {Boolean} False if already collapsed.
*/
collapse: api.Section.prototype.collapse,
@@ -1495,7 +1495,7 @@
/**
* Get the position (index) of the widget in the containing sidebar
*
- * @returns {Number}
+ * @return {Number}
*/
getWidgetSidebarPosition: function() {
var sidebarWidgetIds, position;
@@ -1652,7 +1652,7 @@
/**
* Update the notice.
*
- * @returns {void}
+ * @return {void}
*/
updateNotice = function() {
var activeSectionCount = getActiveSectionCount(), someRenderedMessage, nonRenderedAreaCount, registeredAreaCount;
@@ -1708,7 +1708,7 @@
*
* @since 4.4.0
*
- * @returns {boolean}
+ * @return {boolean}
*/
isContextuallyActive: function() {
var panel = this;
@@ -2061,7 +2061,7 @@
/**
* @param {string} widgetId or an id_base for adding a previously non-existing widget.
- * @returns {object|false} widget_form control instance, or false on error.
+ * @return {object|false} widget_form control instance, or false on error.
*/
addWidget: function( widgetId ) {
var self = this, controlHtml, $widget, controlType = 'widget_form', controlContainer, controlConstructor,
@@ -2330,7 +2330,7 @@
/**
* @param {String} widgetId
- * @returns {Object}
+ * @return {Object}
*/
function parseWidgetId( widgetId ) {
var matches, parsed = {
@@ -2352,7 +2352,7 @@
/**
* @param {String} widgetId
- * @returns {String} settingId
+ * @return {String} settingId
*/
function widgetIdToSettingId( widgetId ) {
var parsed = parseWidgetId( widgetId ), settingId;
diff --git a/src/js/_enqueues/wp/dashboard.js b/src/js/_enqueues/wp/dashboard.js
index aa9f9218fb..bcdc783e70 100644
--- a/src/js/_enqueues/wp/dashboard.js
+++ b/src/js/_enqueues/wp/dashboard.js
@@ -23,7 +23,7 @@ jQuery(document).ready( function($) {
*
* @param {boolean} visible Should it be visible or not.
*
- * @returns {void}
+ * @return {void}
*/
updateWelcomePanel = function( visible ) {
$.post( ajaxurl, {
@@ -72,7 +72,7 @@ jQuery(document).ready( function($) {
*
* @param {string} el Optional. Widget to fetch or none to update all.
*
- * @returns {void}
+ * @return {void}
*/
window.ajaxPopulateWidgets = function(el) {
/**
@@ -81,7 +81,7 @@ jQuery(document).ready( function($) {
* @param {number} i Number of half-seconds to use as the timeout.
* @param {string} id ID of the element which is going to be checked for changes.
*
- * @returns {void}
+ * @return {void}
*/
function show(i, id) {
var p, e = $('#' + id + ' div.inside:visible').find('.widget-loading');
@@ -127,7 +127,7 @@ jQuery(document).ready( function($) {
*
* @global
*
- * @returns {void}
+ * @return {void}
*/
window.quickPressLoad = function() {
var act = $('#quickpost-action'), t;
@@ -159,7 +159,7 @@ jQuery(document).ready( function($) {
/**
* Highlights the latest post for one second.
*
- * @returns {void}
+ * @return {void}
*/
function highlightLatestPost () {
var latestPost = $('.drafts ul li').first();
@@ -189,7 +189,7 @@ jQuery(document).ready( function($) {
*
* @since 3.6.0
*
- * @returns {void}
+ * @return {void}
*/
function autoResizeTextarea() {
// When IE8 or older is used to render this document, exit.
@@ -285,7 +285,7 @@ jQuery( function( $ ) {
*
* @since 4.8.0
*
- * @returns {void}
+ * @return {void}
*/
init: function() {
if ( app.initialized ) {
@@ -319,7 +319,7 @@ jQuery( function( $ ) {
/**
* Filters events based on entered location.
*
- * @returns {void}
+ * @return {void}
*/
$container.on( 'submit', '.community-events-form', function( event ) {
var location = $.trim( $( '#community-events-location' ).val() );
@@ -356,7 +356,7 @@ jQuery( function( $ ) {
* @param {event|string} action 'show' or 'hide' to specify a state;
* or an event object to flip between states.
*
- * @returns {void}
+ * @return {void}
*/
toggleLocationForm: function( action ) {
var $toggleButton = $( '.community-events-toggle-location' ),
@@ -401,7 +401,7 @@ jQuery( function( $ ) {
*
* @param {Object} requestParams REST API Request parameters object.
*
- * @returns {void}
+ * @return {void}
*/
getEvents: function( requestParams ) {
var initiatedBy,
@@ -455,7 +455,7 @@ jQuery( function( $ ) {
* @param {string} initiatedBy 'user' to indicate that this was triggered manually by the user;
* 'app' to indicate it was triggered automatically by the app itself.
*
- * @returns {void}
+ * @return {void}
*/
renderEventsTemplate: function( templateParams, initiatedBy ) {
var template,
diff --git a/src/js/_enqueues/wp/editor/base.js b/src/js/_enqueues/wp/editor/base.js
index 050f24692d..6159467b9c 100644
--- a/src/js/_enqueues/wp/editor/base.js
+++ b/src/js/_enqueues/wp/editor/base.js
@@ -26,7 +26,7 @@ window.wp = window.wp || {};
*
* @since 4.3.0
*
- * @returns {void}
+ * @return {void}
*/
$$( document ).on( 'click', function( event ) {
var id, mode,
@@ -47,7 +47,7 @@ window.wp = window.wp || {};
* @since 3.9.0
*
* @param {Object} editor The TinyMCE editor.
- * @returns {number} If the height is between 10 and 200 return the height,
+ * @return {number} If the height is between 10 and 200 return the height,
* else return 30.
*/
function getToolbarHeight( editor ) {
@@ -70,7 +70,7 @@ window.wp = window.wp || {};
*
* @param {string} id The id of the editor you want to change the editor mode for. Default: `content`.
* @param {string} mode The mode you want to switch to. Default: `toggle`.
- * @returns {void}
+ * @return {void}
*/
function switchEditor( id, mode ) {
id = id || 'content';
@@ -202,7 +202,7 @@ window.wp = window.wp || {};
* @param {string} content The test content where the cursor is.
* @param {number} cursorPosition The cursor position inside the content.
*
- * @returns {(null|Object)} Null if cursor is not in a tag, Object if the cursor is inside a tag.
+ * @return {(null|Object)} Null if cursor is not in a tag, Object if the cursor is inside a tag.
*/
function getContainingTagInfo( content, cursorPosition ) {
var lastLtPos = content.lastIndexOf( '<', cursorPosition - 1 ),
@@ -659,7 +659,7 @@ window.wp = window.wp || {};
* and why this solution was chosen.
*
* @param {Object} editor The editor where we must find the selection.
- * @returns {(null|Object)} The selection range position in the editor.
+ * @return {(null|Object)} The selection range position in the editor.
*/
function findBookmarkedPosition( editor ) {
// Get the TinyMCE `window` reference, since we need to access the raw selection.
@@ -1004,7 +1004,7 @@ window.wp = window.wp || {};
* @memberof switchEditors
*
* @param {string} text The text input.
- * @returns {string} The formatted text.
+ * @return {string} The formatted text.
*/
function autop( text ) {
var preserve_linebreaks = false,
@@ -1131,7 +1131,7 @@ window.wp = window.wp || {};
* @memberof switchEditors
*
* @param {String} html The content from the visual editor.
- * @returns {String} the filtered content.
+ * @return {String} the filtered content.
*/
function pre_wpautop( html ) {
var obj = { o: exports, data: html, unfiltered: html };
@@ -1157,7 +1157,7 @@ window.wp = window.wp || {};
* @memberof switchEditors
*
* @param {String} text The content from the text editor.
- * @returns {String} filtered content.
+ * @return {String} filtered content.
*/
function wpautop( text ) {
var obj = { o: exports, data: text, unfiltered: text };
diff --git a/src/js/_enqueues/wp/editor/dfw.js b/src/js/_enqueues/wp/editor/dfw.js
index 030193a39f..53ec6f594e 100644
--- a/src/js/_enqueues/wp/editor/dfw.js
+++ b/src/js/_enqueues/wp/editor/dfw.js
@@ -15,7 +15,7 @@
*
* @since 4.0.0
*
- * @returns {void}
+ * @return {void}
*/
$( function() {
var $wrap = $( '#postdivrich' ),
@@ -70,7 +70,7 @@
*
* @since 4.6.1
*
- * @returns {void}
+ * @return {void}
*/
var shrinkTextarea = window._.throttle( function() {
var x = window.scrollX || document.documentElement.scrollLeft;
@@ -102,7 +102,7 @@
*
* @since 4.6.1
*
- * @returns {void}
+ * @return {void}
*/
function textEditorResize() {
var length = textEditor.value.length;
@@ -135,7 +135,7 @@
*
* @since 4.0.0
*
- * @returns {void}
+ * @return {void}
*/
function getHeights() {
var windowWidth = $window.width();
@@ -169,7 +169,7 @@
* @param {event} event The TinyMCE editor init event.
* @param {object} editor The editor to bind the vents on.
*
- * @returns {void}
+ * @return {void}
*/
$document.on( 'tinymce-editor-init.editor-expand', function( event, editor ) {
// VK contains the type of key pressed. VK = virtual keyboard.
@@ -177,7 +177,7 @@
/**
* Hides any float panel with a hover state. Additionally hides tooltips.
*
- * @returns {void}
+ * @return {void}
*/
hideFloatPanels = _.debounce( function() {
! $( '.mce-floatpanel:hover' ).length && window.tinymce.ui.FloatPanel.hideAll();
@@ -204,7 +204,7 @@
/**
* Gets the offset of the editor.
*
- * @returns {Number|Boolean} Returns the offset of the editor
+ * @return {Number|Boolean} Returns the offset of the editor
* or false if there is no offset height.
*/
function mceGetCursorOffset() {
@@ -241,7 +241,7 @@
*
* @param {event} event The event to get the key code from.
*
- * @returns {void}
+ * @return {void}
*/
function mceKeyup( event ) {
var key = event.keyCode;
@@ -270,7 +270,7 @@
*
* @param {string} key The key code of the pressed key.
*
- * @returns {void}
+ * @return {void}
*/
function mceScroll( key ) {
var offset = mceGetCursorOffset(),
@@ -331,7 +331,7 @@
*
* @param {event} event The FullscreenStateChanged event.
*
- * @returns {void}
+ * @return {void}
*/
function mceFullscreenToggled( event ) {
// event.state is true if the editor is fullscreen.
@@ -348,7 +348,7 @@
*
* @since 4.0.0
*
- * @returns {void}
+ * @return {void}
*/
function mceShow() {
$window.on( 'scroll.mce-float-panels', hideFloatPanels );
@@ -367,7 +367,7 @@
*
* @since 4.0.0
*
- * @returns {void}
+ * @return {void}
*/
function mceHide() {
$window.off( 'scroll.mce-float-panels' );
@@ -391,7 +391,7 @@
*
* @since 4.1.0
*
- * @returns {void}
+ * @return {void}
*/
function toggleAdvanced() {
advanced = ! advanced;
@@ -402,7 +402,7 @@
*
* @since 4.0.0
*
- * @returns {void}
+ * @return {void}
*/
mceBind = function() {
editor.on( 'keyup', mceKeyup );
@@ -427,7 +427,7 @@
*
* @since 4.0.0
*
- * @returns {void}
+ * @return {void}
*/
mceUnbind = function() {
editor.off( 'keyup', mceKeyup );
@@ -460,7 +460,7 @@
*
* @param {event} event The event that calls this function.
*
- * @returns {void}
+ * @return {void}
*/
function adjust( event ) {
@@ -772,7 +772,7 @@
*
* @since 4.0.0
*
- * @returns {void}
+ * @return {void}
*/
function fullscreenHide() {
textEditorResize();
@@ -786,7 +786,7 @@
*
* @param {function} callback The function to run in the timeout.
*
- * @returns {void}
+ * @return {void}
*/
function initialResize( callback ) {
for ( var i = 1; i < 6; i++ ) {
@@ -799,7 +799,7 @@
*
* @since 4.0.0
*
- * @returns {void}
+ * @return {void}
*/
function afterScroll() {
clearTimeout( scrollTimer );
@@ -811,7 +811,7 @@
*
* @since 4.0.0
*
- * @returns {void}
+ * @return {void}
*/
function on() {
/*
@@ -881,7 +881,7 @@
*
* @since 4.0.0
*
- * @returns {void}
+ * @return {void}
*/
function off() {
var height = parseInt( window.getUserSetting( 'ed_size', 300 ), 10 );
@@ -975,7 +975,7 @@
*
* @since 4.1.0
*
- * @returns {void}
+ * @return {void}
*/
$( function() {
var $body = $( document.body ),
@@ -1025,7 +1025,7 @@
*
* @since 4.1.0
*
- * @returns {void}
+ * @return {void}
*/
function recalcEditorRect() {
editorRect = $editor.offset();
@@ -1038,7 +1038,7 @@
*
* @since 4.1.0
*
- * @returns {void}
+ * @return {void}
*/
function activate() {
if ( ! _isActive ) {
@@ -1054,7 +1054,7 @@
*
* @since 4.1.0
*
- * @returns {void}
+ * @return {void}
*/
function deactivate() {
if ( _isActive ) {
@@ -1072,7 +1072,7 @@
*
* @since 4.1.0
*
- * @returns {boolean} Returns true is _isActive is true.
+ * @return {boolean} Returns true is _isActive is true.
*/
function isActive() {
return _isActive;
@@ -1083,7 +1083,7 @@
*
* @since 4.1.0
*
- * @returns {void}
+ * @return {void}
*/
function on() {
if ( ! _isOn && _isActive ) {
@@ -1106,7 +1106,7 @@
*
* @since 4.1.0
*
- * @returns {void}
+ * @return {void}
*/
function off() {
if ( _isOn ) {
@@ -1129,7 +1129,7 @@
*
* @since 4.1.0
*
- * @returns {void}
+ * @return {void}
*/
function toggle() {
if ( _isOn ) {
@@ -1144,7 +1144,7 @@
*
* @since 4.1.0
*
- * @returns {boolean} Returns true if _isOn is true.
+ * @return {boolean} Returns true if _isOn is true.
*/
function isOn() {
return _isOn;
@@ -1161,7 +1161,7 @@
*
* @param event The event that triggers this function.
*
- * @returns {void}
+ * @return {void}
*/
function fadeOut( event ) {
var isMac,
@@ -1300,7 +1300,7 @@
*
* @param event The event that triggers this function.
*
- * @returns {void}
+ * @return {void}
*/
function fadeIn( event ) {
if ( faded ) {
@@ -1346,7 +1346,7 @@
*
* @since 4.1.0
*
- * @returns {void}
+ * @return {void}
*/
function maybeFadeIn() {
setTimeout( function() {
@@ -1368,7 +1368,7 @@
*
* @since 4.1.0
*
- * @returns {void}
+ * @return {void}
*/
function fadeOutAdminBar() {
if ( ! fadedAdminBar && faded ) {
@@ -1389,7 +1389,7 @@
*
* @since 4.1.0
*
- * @returns {void}
+ * @return {void}
*/
function fadeInAdminBar() {
if ( fadedAdminBar ) {
@@ -1404,7 +1404,7 @@
*
* @since 4.1.0
*
- * @returns {void}
+ * @return {void}
*/
function fadeOutSlug() {
if ( ! fadedSlug && faded && ! $slug.find( ':focus').length ) {
@@ -1421,7 +1421,7 @@
*
* @since 4.1.0
*
- * @returns {void}
+ * @return {void}
*/
function fadeInSlug() {
if ( fadedSlug ) {
@@ -1442,7 +1442,7 @@
*
* @param {event} event The event to trigger the toggle.
*
- * @returns {void}
+ * @return {void}
*/
function toggleViaKeyboard( event ) {
if ( event.altKey && event.shiftKey && 87 === event.keyCode ) {
@@ -1462,7 +1462,7 @@
* @param {event} event The TinyMCE editor setup event.
* @param {object} editor The editor to add the button to.
*
- * @returns {void}
+ * @return {void}
*/
$document.on( 'tinymce-editor-setup.focus', function( event, editor ) {
editor.addButton( 'dfw', {
@@ -1511,7 +1511,7 @@
* @param {event} event The TinyMCE editor init event.
* @param {object} editor The editor to bind events on.
*
- * @returns {void}
+ * @return {void}
*/
$document.on( 'tinymce-editor-init.focus', function( event, editor ) {
var mceBind, mceUnbind;
@@ -1568,7 +1568,7 @@
* @param {event} event The quicktags init event.
* @param {object} editor The editor to bind events on.
*
- * @returns {void}
+ * @return {void}
*/
$document.on( 'quicktags-init', function( event, editor ) {
var $button;
diff --git a/src/js/_enqueues/wp/heartbeat.js b/src/js/_enqueues/wp/heartbeat.js
index 3e51a72167..98cba71c54 100644
--- a/src/js/_enqueues/wp/heartbeat.js
+++ b/src/js/_enqueues/wp/heartbeat.js
@@ -34,7 +34,7 @@
*
* @since 3.6.0
*
- * @returns {Object} An instance of the Heartbeat class.
+ * @return {Object} An instance of the Heartbeat class.
* @constructor
*/
var Heartbeat = function() {
@@ -110,7 +110,7 @@
*
* @since 3.8.0
*
- * @returns {void}
+ * @return {void}
*/
function initialize() {
var options, hidden, visibilityState, visibilitychange;
@@ -249,7 +249,7 @@
*
* @since 3.6.0
*
- * @returns {number} Returns the current time.
+ * @return {number} Returns the current time.
*/
function time() {
return (new Date()).getTime();
@@ -262,7 +262,7 @@
*
* @since 3.6.0
*
- * @returns {boolean} Returns whether or not the iframe is from the same origin.
+ * @return {boolean} Returns whether or not the iframe is from the same origin.
*/
function isLocalFrame( frame ) {
var origin, src = frame.src;
@@ -295,7 +295,7 @@
*
* @since 4.1.0
*
- * @returns {void}
+ * @return {void}
*/
function checkFocus() {
if ( settings.hasFocus && ! document.hasFocus() ) {
@@ -316,7 +316,7 @@
* @param {number} status The HTTP status code passed from jqXHR
* (200, 404, 500, etc.).
*
- * @returns {void}
+ * @return {void}
*/
function setErrorState( error, status ) {
var trigger;
@@ -363,7 +363,7 @@
*
* @since 3.8.0
*
- * @returns {void}
+ * @return {void}
*/
function clearErrorState() {
// Has connected successfully.
@@ -384,7 +384,7 @@
*
* @since 3.6.0
*
- * @returns {void}
+ * @return {void}
*/
function connect() {
var ajaxData, heartbeatData;
@@ -484,7 +484,7 @@
*
* @since 3.8.0
*
- * @returns {void}
+ * @return {void}
*/
function scheduleNextTick() {
var delta = time() - settings.lastTick,
@@ -530,7 +530,7 @@
*
* @since 3.6.0
*
- * @returns {void}
+ * @return {void}
*/
function blurred() {
settings.hasFocus = false;
@@ -543,7 +543,7 @@
*
* @since 3.6.0
*
- * @returns {void}
+ * @return {void}
*/
function focused() {
settings.userActivity = time();
@@ -564,7 +564,7 @@
*
* @since 3.6.0
*
- * @returns {void}
+ * @return {void}
*/
function userIsActive() {
settings.userActivityEvents = false;
@@ -590,7 +590,7 @@
*
* @since 3.8.0
*
- * @returns {void}
+ * @return {void}
*/
function checkUserActivity() {
var lastActive = settings.userActivity ? time() - settings.userActivity : 0;
@@ -632,7 +632,7 @@
* @since 3.6.0
* @memberOf wp.heartbeat.prototype
*
- * @returns {boolean} True if the window or the user is active.
+ * @return {boolean} True if the window or the user is active.
*/
function hasFocus() {
return settings.hasFocus;
@@ -645,7 +645,7 @@
*
* @memberOf wp.heartbeat.prototype
*
- * @returns {boolean} True if a connection error was found.
+ * @return {boolean} True if a connection error was found.
*/
function hasConnectionError() {
return settings.connectionError;
@@ -661,7 +661,7 @@
*
* @memberOf wp.heartbeat.prototype
*
- * @returns {void}
+ * @return {void}
*/
function connectNow() {
settings.lastTick = 0;
@@ -680,7 +680,7 @@
*
* @memberOf wp.heartbeat.prototype
*
- * @returns {void}
+ * @return {void}
*/
function disableSuspend() {
settings.suspendEnabled = false;
@@ -703,7 +703,7 @@
* @param {string} ticks Tells how many ticks before the interval reverts
* back. Used with speed = 'fast' or 5.
*
- * @returns {number} Current interval in seconds.
+ * @return {number} Current interval in seconds.
*/
function interval( speed, ticks ) {
var newInterval,
@@ -784,7 +784,7 @@
* @param {*} data The data to send.
* @param {boolean} noOverwrite Whether to overwrite existing data in the queue.
*
- * @returns {boolean} True if the data was queued.
+ * @return {boolean} True if the data was queued.
*/
function enqueue( handle, data, noOverwrite ) {
if ( handle ) {
@@ -805,7 +805,7 @@
*
* @param {string} handle The handle for the data.
*
- * @returns {boolean} True if the data is queued with this handle.
+ * @return {boolean} True if the data is queued with this handle.
*/
function isQueued( handle ) {
if ( handle ) {
@@ -822,7 +822,7 @@
*
* @param {string} handle The handle for the data.
*
- * @returns {void}
+ * @return {void}
*/
function dequeue( handle ) {
if ( handle ) {
@@ -839,7 +839,7 @@
*
* @param {string} handle The handle for the data.
*
- * @returns {*} The data or undefined.
+ * @return {*} The data or undefined.
*/
function getQueuedItem( handle ) {
if ( handle ) {
diff --git a/src/js/_enqueues/wp/media/audiovideo.js b/src/js/_enqueues/wp/media/audiovideo.js
index a75d8a2f29..75eee00d52 100644
--- a/src/js/_enqueues/wp/media/audiovideo.js
+++ b/src/js/_enqueues/wp/media/audiovideo.js
@@ -149,7 +149,7 @@ wp.media.audio = {
* @since 4.2.0
*
* @param {string} data The text to apply the shortcode on.
- * @returns {wp.media} The media object.
+ * @return {wp.media} The media object.
*/
edit : function( data ) {
var frame, shortcode = wp.shortcode.next( 'audio', data ).shortcode;
@@ -169,7 +169,7 @@ wp.media.audio = {
* @since 4.2.0
*
* @param {Array} model Array with attributes for the shortcode.
- * @returns {wp.shortcode} The audio shortcode object.
+ * @return {wp.shortcode} The audio shortcode object.
*/
shortcode : function( model ) {
var content;
@@ -224,7 +224,7 @@ wp.media.video = {
* @since 4.2.0
*
* @param {string} data The text to apply the shortcode on.
- * @returns {wp.media} The media object.
+ * @return {wp.media} The media object.
*/
edit : function( data ) {
var frame,
@@ -249,7 +249,7 @@ wp.media.video = {
* @since 4.2.0
*
* @param {Array} model Array with attributes for the shortcode.
- * @returns {wp.shortcode} The video shortcode object.
+ * @return {wp.shortcode} The video shortcode object.
*/
shortcode : function( model ) {
var content;
diff --git a/src/js/_enqueues/wp/media/editor.js b/src/js/_enqueues/wp/media/editor.js
index 2b4055aea3..380dbe2ce2 100644
--- a/src/js/_enqueues/wp/media/editor.js
+++ b/src/js/_enqueues/wp/media/editor.js
@@ -21,7 +21,7 @@
*
* @param {object} attrs Map of props from a shortcode or settings.
* @param {string} key The key within the passed map to check for a value.
- * @returns {mixed|undefined} The original or coerced value of key within attrs.
+ * @return {mixed|undefined} The original or coerced value of key within attrs.
*/
wp.media.coerce = function ( attrs, key ) {
if ( _.isUndefined( attrs[ key ] ) && ! _.isUndefined( this.defaults[ key ] ) ) {
@@ -43,7 +43,7 @@
*
* @param {Object} [props={}] Attachment details (align, link, size, etc).
* @param {Object} attachment The attachment object, media version of Post.
- * @returns {Object} Joined props
+ * @return {Object} Joined props
*/
props: function( props, attachment ) {
var link, linkUrl, size, sizes,
@@ -109,7 +109,7 @@
*
* @param {Object} props Attachment details (align, link, size, etc).
* @param {Object} attachment The attachment object, media version of Post.
- * @returns {string} The link markup
+ * @return {string} The link markup
*/
link: function( props, attachment ) {
var options;
@@ -135,7 +135,7 @@
*
* @param {Object} props Attachment details (align, link, size, etc).
* @param {Object} attachment The attachment object, media version of Post.
- * @returns {string} The audio shortcode
+ * @return {string} The audio shortcode
*/
audio: function( props, attachment ) {
return wp.media.string._audioVideo( 'audio', props, attachment );
@@ -145,7 +145,7 @@
*
* @param {Object} props Attachment details (align, link, size, etc).
* @param {Object} attachment The attachment object, media version of Post.
- * @returns {string} The video shortcode
+ * @return {string} The video shortcode
*/
video: function( props, attachment ) {
return wp.media.string._audioVideo( 'video', props, attachment );
@@ -158,7 +158,7 @@
* @param {string} type The shortcode tag name: 'audio' or 'video'.
* @param {Object} props Attachment details (align, link, size, etc).
* @param {Object} attachment The attachment object, media version of Post.
- * @returns {string} The media shortcode
+ * @return {string} The media shortcode
*/
_audioVideo: function( type, props, attachment ) {
var shortcode, html, extension;
@@ -205,7 +205,7 @@
*
* @param {Object} props Attachment details (align, link, size, etc).
* @param {Object} attachment The attachment object, media version of Post.
- * @returns {string}
+ * @return {string}
*/
image: function( props, attachment ) {
var img = {},
@@ -345,10 +345,10 @@
* Retrieve attachments based on the properties of the passed shortcode
*
* @param {wp.shortcode} shortcode An instance of wp.shortcode().
- * @returns {wp.media.model.Attachments} A Backbone.Collection containing
- * the media items belonging to a collection.
- * The query[ this.tag ] property is a Backbone.Model
- * containing the 'props' for the collection.
+ * @return {wp.media.model.Attachments} A Backbone.Collection containing
+ * the media items belonging to a collection.
+ * The query[ this.tag ] property is a Backbone.Model
+ * containing the 'props' for the collection.
*/
attachments: function( shortcode ) {
var shortcodeString = shortcode.string(),
@@ -414,7 +414,7 @@
* the media items belonging to a collection.
* The query[ this.tag ] property is a Backbone.Model
* containing the 'props' for the collection.
- * @returns {wp.shortcode}
+ * @return {wp.shortcode}
*/
shortcode: function( attachments ) {
var props = attachments.props.toJSON(),
@@ -483,7 +483,7 @@
*
* @this wp.media.{prop}
*
- * @returns {wp.media.view.MediaFrame.Select} A media workflow.
+ * @return {wp.media.view.MediaFrame.Select} A media workflow.
*/
edit: function( content ) {
var shortcode = wp.shortcode.next( this.tag, content ),
@@ -603,7 +603,7 @@
/**
* Get the featured image post ID
*
- * @returns {wp.media.view.settings.post.featuredImageId|number}
+ * @return {wp.media.view.settings.post.featuredImageId|number}
*/
get: function() {
return wp.media.view.settings.post.featuredImageId;
@@ -642,7 +642,7 @@
*
* @this wp.media.featuredImage
*
- * @returns {wp.media.view.MediaFrame.Select} A media workflow.
+ * @return {wp.media.view.MediaFrame.Select} A media workflow.
*/
frame: function() {
if ( this._frame ) {
@@ -775,7 +775,7 @@
*
* @this wp.media.editor
*
- * @returns {wp.media.view.MediaFrame.Select} A media workflow.
+ * @return {wp.media.view.MediaFrame.Select} A media workflow.
*/
add: function( id, options ) {
var workflow = this.get( id );
@@ -879,7 +879,7 @@
*
* @param {string} [id=''] A slug used to identify the workflow.
*
- * @returns {wpActiveEditor|string|tinymce.activeEditor.id}
+ * @return {wpActiveEditor|string|tinymce.activeEditor.id}
*/
id: function( id ) {
if ( id ) {
@@ -905,7 +905,7 @@
*
* @this wp.media.editor
*
- * @returns {wp.media.view.MediaFrame} A media workflow.
+ * @return {wp.media.view.MediaFrame} A media workflow.
*/
get: function( id ) {
id = this.id( id );
@@ -930,7 +930,7 @@
*
* @param {Object} props Attachment details (align, link, size, etc).
* @param {Object} attachment The attachment object, media version of Post.
- * @returns {Promise}
+ * @return {Promise}
*/
attachment: function( props, attachment ) {
var caption = attachment.caption,
@@ -984,7 +984,7 @@
* Called when 'Insert From URL' source is not an image. Example: YouTube url.
*
* @param {Object} embed
- * @returns {Promise}
+ * @return {Promise}
*/
link: function( embed ) {
return wp.media.post( 'send-link-to-editor', {
@@ -1004,7 +1004,7 @@
*
* @this wp.media.editor
*
- * @returns {wp.media.view.MediaFrame}
+ * @return {wp.media.view.MediaFrame}
*/
open: function( id, options ) {
var workflow;
diff --git a/src/js/_enqueues/wp/media/models.js b/src/js/_enqueues/wp/media/models.js
index 7c6f4e66f1..308aea41c0 100644
--- a/src/js/_enqueues/wp/media/models.js
+++ b/src/js/_enqueues/wp/media/models.js
@@ -138,7 +138,7 @@ _.extend( media, /** @lends wp.media */{
* Scales a set of dimensions to fit within bounding dimensions.
*
* @param {Object} dimensions
- * @returns {Object}
+ * @return {Object}
*/
fit: function( dimensions ) {
var width = dimensions.width,
@@ -184,7 +184,7 @@ _.extend( media, /** @lends wp.media */{
* @param {String} string
* @param {Number} [length=30]
* @param {String} [replacement=&hellip;]
- * @returns {String} The string, unless length is greater than string.length.
+ * @return {String} The string, unless length is greater than string.length.
*/
truncate: function( string, length, replacement ) {
length = length || 30;
@@ -208,7 +208,7 @@ _.extend( media, /** @lends wp.media */{
*
* @static
* @param {String} id A string used to identify a model.
- * @returns {wp.media.model.Attachment}
+ * @return {wp.media.model.Attachment}
*/
media.attachment = function( id ) {
return Attachment.get( id );
@@ -228,7 +228,7 @@ Attachments.all = new Attachments();
* Shorthand for creating a new Attachments Query.
*
* @param {object} [props]
- * @returns {wp.media.model.Attachments}
+ * @return {wp.media.model.Attachments}
*/
media.query = function( props ) {
return new Attachments( null, {
diff --git a/src/js/_enqueues/wp/media/views.js b/src/js/_enqueues/wp/media/views.js
index 76c79e0b63..d2c35078e6 100644
--- a/src/js/_enqueues/wp/media/views.js
+++ b/src/js/_enqueues/wp/media/views.js
@@ -49,7 +49,7 @@ media.events = _.extend( {}, Backbone.Events );
*
* @param {string} selector
* @param {Number} sensitivity
- * @returns {Promise}
+ * @return {Promise}
*/
media.transition = function( selector, sensitivity ) {
var deferred = $.Deferred();
diff --git a/src/js/_enqueues/wp/password-strength-meter.js b/src/js/_enqueues/wp/password-strength-meter.js
index 753f697ce4..135095910c 100644
--- a/src/js/_enqueues/wp/password-strength-meter.js
+++ b/src/js/_enqueues/wp/password-strength-meter.js
@@ -27,7 +27,7 @@ window.wp = window.wp || {};
* the password.
* @param {string} password2 The password confirmation.
*
- * @returns {number} The password strength score.
+ * @return {number} The password strength score.
*/
meter : function( password1, blacklist, password2 ) {
if ( ! $.isArray( blacklist ) )
@@ -54,7 +54,7 @@ window.wp = window.wp || {};
*
* @since 3.7.0
*
- * @returns {string[]} The array of words to be blacklisted.
+ * @return {string[]} The array of words to be blacklisted.
*/
userInputBlacklist : function() {
var i, userInputFieldsLength, rawValuesLength, currentField,
diff --git a/src/js/_enqueues/wp/theme-plugin-editor.js b/src/js/_enqueues/wp/theme-plugin-editor.js
index 6127b2cf7a..6ddb9dff47 100644
--- a/src/js/_enqueues/wp/theme-plugin-editor.js
+++ b/src/js/_enqueues/wp/theme-plugin-editor.js
@@ -36,7 +36,7 @@ wp.themePluginEditor = (function( $ ) {
* @param {jQuery} form - Form element.
* @param {object} settings - Settings.
* @param {object|boolean} settings.codeEditor - Code editor settings (or `false` if syntax highlighting is disabled).
- * @returns {void}
+ * @return {void}
*/
component.init = function init( form, settings ) {
@@ -94,7 +94,7 @@ wp.themePluginEditor = (function( $ ) {
* Set up and display the warning modal.
*
* @since 4.9.0
- * @returns {void}
+ * @return {void}
*/
component.showWarning = function() {
// Get the text within the modal.
@@ -125,7 +125,7 @@ wp.themePluginEditor = (function( $ ) {
*
* @since 4.9.0
* @param {object} event jQuery event object.
- * @returns {void}
+ * @return {void}
*/
component.constrainTabbing = function( event ) {
var firstTabbable, lastTabbable;
@@ -150,7 +150,7 @@ wp.themePluginEditor = (function( $ ) {
* Dismiss the warning modal.
*
* @since 4.9.0
- * @returns {void}
+ * @return {void}
*/
component.dismissWarning = function() {
@@ -168,7 +168,7 @@ wp.themePluginEditor = (function( $ ) {
* Callback for when a change happens.
*
* @since 4.9.0
- * @returns {void}
+ * @return {void}
*/
component.onChange = function() {
component.dirty = true;
@@ -180,7 +180,7 @@ wp.themePluginEditor = (function( $ ) {
*
* @since 4.9.0
* @param {jQuery.Event} event - Event.
- * @returns {void}
+ * @return {void}
*/
component.submit = function( event ) {
var data = {}, request;
@@ -267,7 +267,7 @@ wp.themePluginEditor = (function( $ ) {
* @param {string} notice.message - Message.
* @param {boolean} [notice.dismissible=false] - Dismissible.
* @param {Function} [notice.onDismiss] - Callback for when a user dismisses the notice.
- * @returns {jQuery} Notice element.
+ * @return {jQuery} Notice element.
*/
component.addNotice = function( notice ) {
var noticeElement;
@@ -303,7 +303,7 @@ wp.themePluginEditor = (function( $ ) {
* @since 4.9.0
*
* @param {string} code - Notice code.
- * @returns {boolean} Whether a notice was removed.
+ * @return {boolean} Whether a notice was removed.
*/
component.removeNotice = function( code ) {
if ( component.noticeElements[ code ] ) {
@@ -320,7 +320,7 @@ wp.themePluginEditor = (function( $ ) {
* Initialize code editor.
*
* @since 4.9.0
- * @returns {void}
+ * @return {void}
*/
component.initCodeEditor = function initCodeEditor() {
var codeEditorSettings, editor;
@@ -332,7 +332,7 @@ wp.themePluginEditor = (function( $ ) {
*
* @since 4.9.0
*
- * @returns {void}
+ * @return {void}
*/
codeEditorSettings.onTabPrevious = function() {
$( '#templateside' ).find( ':tabbable' ).last().focus();
@@ -343,7 +343,7 @@ wp.themePluginEditor = (function( $ ) {
*
* @since 4.9.0
*
- * @returns {void}
+ * @return {void}
*/
codeEditorSettings.onTabNext = function() {
$( '#template' ).find( ':tabbable:not(.CodeMirror-code)' ).first().focus();
@@ -355,7 +355,7 @@ wp.themePluginEditor = (function( $ ) {
* @since 4.9.0
*
* @param {Array} errors - List of linting errors.
- * @returns {void}
+ * @return {void}
*/
codeEditorSettings.onChangeLintingErrors = function( errors ) {
component.lintErrors = errors;
@@ -372,7 +372,7 @@ wp.themePluginEditor = (function( $ ) {
* @since 4.9.0
*
* @param {Array} errorAnnotations - Error annotations.
- * @returns {void}
+ * @return {void}
*/
codeEditorSettings.onUpdateErrorNotice = function onUpdateErrorNotice( errorAnnotations ) {
var message, noticeElement;
@@ -424,7 +424,7 @@ wp.themePluginEditor = (function( $ ) {
* Initialization of the file browser's folder states.
*
* @since 4.9.0
- * @returns {void}
+ * @return {void}
*/
component.initFileBrowser = function initFileBrowser() {
diff --git a/src/js/_enqueues/wp/theme.js b/src/js/_enqueues/wp/theme.js
index 74a90cc609..0d29fe8876 100644
--- a/src/js/_enqueues/wp/theme.js
+++ b/src/js/_enqueues/wp/theme.js
@@ -1399,7 +1399,7 @@ themes.view.Search = wp.Backbone.View.extend({
*
* @param {string} url - URL to navigate to.
* @param {object} state - State.
- * @returns {void}
+ * @return {void}
*/
function navigateRouter( url, state ) {
var router = this;
diff --git a/src/js/_enqueues/wp/updates.js b/src/js/_enqueues/wp/updates.js
index ee5bf3cc58..d7e0de1c39 100644
--- a/src/js/_enqueues/wp/updates.js
+++ b/src/js/_enqueues/wp/updates.js
@@ -1598,7 +1598,7 @@
* @param {string} response.errorCode Error code for the error that occurred.
* @param {string} response.errorMessage The error that occurred.
* @param {string} action The type of request to perform.
- * @returns {boolean} Whether there is an error that needs to be handled or not.
+ * @return {boolean} Whether there is an error that needs to be handled or not.
*/
wp.updates.maybeHandleCredentialError = function( response, action ) {
if ( wp.updates.shouldRequestFilesystemCredentials && response.errorCode && 'unable_to_connect_to_filesystem' === response.errorCode ) {
diff --git a/src/js/_enqueues/wp/utils/word-count.js b/src/js/_enqueues/wp/utils/word-count.js
index 999a42c50f..41a052b572 100644
--- a/src/js/_enqueues/wp/utils/word-count.js
+++ b/src/js/_enqueues/wp/utils/word-count.js
@@ -41,7 +41,7 @@
* @param {Array} settings.l10n.shortcodes Optional. Array of shortcodes that should be removed
* from the text.
*
- * @return void
+ * @return {void}
*/
function WordCounter( settings ) {
var key,
diff --git a/src/js/_enqueues/wp/widgets/custom-html.js b/src/js/_enqueues/wp/widgets/custom-html.js
index 93aa901c2f..3e8d923dad 100644
--- a/src/js/_enqueues/wp/widgets/custom-html.js
+++ b/src/js/_enqueues/wp/widgets/custom-html.js
@@ -44,7 +44,7 @@ wp.customHtmlWidgets = ( function( $ ) {
* @param {jQuery} options.el - Control field container element.
* @param {jQuery} options.syncContainer - Container element where fields are synced for the server.
*
- * @returns {void}
+ * @return {void}
*/
initialize: function initialize( options ) {
var control = this;
@@ -97,7 +97,7 @@ wp.customHtmlWidgets = ( function( $ ) {
* A field will only be updated if it is not currently focused, to avoid
* overwriting content that the user is entering.
*
- * @returns {void}
+ * @return {void}
*/
updateFields: function updateFields() {
var control = this, syncInput;
@@ -123,7 +123,7 @@ wp.customHtmlWidgets = ( function( $ ) {
* Show linting error notice.
*
* @param {Array} errorAnnotations - Error annotations.
- * @returns {void}
+ * @return {void}
*/
updateErrorNotice: function( errorAnnotations ) {
var control = this, errorNotice, message = '', customizeSetting;
@@ -164,7 +164,7 @@ wp.customHtmlWidgets = ( function( $ ) {
/**
* Initialize editor.
*
- * @returns {void}
+ * @return {void}
*/
initializeEditor: function initializeEditor() {
var control = this, settings;
@@ -180,7 +180,7 @@ wp.customHtmlWidgets = ( function( $ ) {
*
* @ignore
*
- * @returns {void}
+ * @return {void}
*/
onTabPrevious: function onTabPrevious() {
control.fields.title.focus();
@@ -191,7 +191,7 @@ wp.customHtmlWidgets = ( function( $ ) {
*
* @ignore
*
- * @returns {void}
+ * @return {void}
*/
onTabNext: function onTabNext() {
var tabbables = control.syncContainer.add( control.syncContainer.parent().find( '.widget-position, .widget-control-actions' ) ).find( ':tabbable' );
@@ -204,7 +204,7 @@ wp.customHtmlWidgets = ( function( $ ) {
* @ignore
*
* @param {Array} errorAnnotations - Error notifications.
- * @returns {void}
+ * @return {void}
*/
onChangeLintingErrors: function onChangeLintingErrors( errorAnnotations ) {
control.currentErrorAnnotations = errorAnnotations;
@@ -216,7 +216,7 @@ wp.customHtmlWidgets = ( function( $ ) {
* @ignore
*
* @param {Array} errorAnnotations - Error annotations.
- * @returns {void}
+ * @return {void}
*/
onUpdateErrorNotice: function onUpdateErrorNotice( errorAnnotations ) {
control.saveButton.toggleClass( 'validation-blocked disabled', errorAnnotations.length > 0 );
@@ -288,7 +288,7 @@ wp.customHtmlWidgets = ( function( $ ) {
* @param {jQuery.Event} event - Event.
* @param {jQuery} widgetContainer - Widget container element.
*
- * @returns {void}
+ * @return {void}
*/
component.handleWidgetAdded = function handleWidgetAdded( event, widgetContainer ) {
var widgetForm, idBase, widgetControl, widgetId, animatedCheckDelay = 50, renderWhenAnimationDone, fieldContainer, syncContainer;
@@ -347,7 +347,7 @@ wp.customHtmlWidgets = ( function( $ ) {
*
* @alias wp.customHtmlWidgets.setupAccessibleMode
*
- * @returns {void}
+ * @return {void}
*/
component.setupAccessibleMode = function setupAccessibleMode() {
var widgetForm, idBase, widgetControl, fieldContainer, syncContainer;
@@ -384,7 +384,7 @@ wp.customHtmlWidgets = ( function( $ ) {
*
* @param {jQuery.Event} event - Event.
* @param {jQuery} widgetContainer - Widget container element.
- * @returns {void}
+ * @return {void}
*/
component.handleWidgetUpdated = function handleWidgetUpdated( event, widgetContainer ) {
var widgetForm, widgetId, widgetControl, idBase;
@@ -415,7 +415,7 @@ wp.customHtmlWidgets = ( function( $ ) {
*
* @param {object} settings - Options for code editor, exported from PHP.
*
- * @returns {void}
+ * @return {void}
*/
component.init = function init( settings ) {
var $document = $( document );
diff --git a/src/js/_enqueues/wp/widgets/media-audio.js b/src/js/_enqueues/wp/widgets/media-audio.js
index e050c30aa3..a57925364d 100644
--- a/src/js/_enqueues/wp/widgets/media-audio.js
+++ b/src/js/_enqueues/wp/widgets/media-audio.js
@@ -19,7 +19,7 @@
/**
* Create the default states.
*
- * @returns {void}
+ * @return {void}
*/
createStates: function createStates() {
this.states.add([
@@ -70,7 +70,7 @@
* Map model props to media frame props.
*
* @param {Object} modelProps - Model props.
- * @returns {Object} Media frame props.
+ * @return {Object} Media frame props.
*/
mapModelToMediaFrameProps: function mapModelToMediaFrameProps( modelProps ) {
var control = this, mediaFrameProps;
@@ -82,7 +82,7 @@
/**
* Render preview.
*
- * @returns {void}
+ * @return {void}
*/
renderPreview: function renderPreview() {
var control = this, previewContainer, previewTemplate, attachmentId, attachmentUrl;
@@ -109,7 +109,7 @@
/**
* Open the media audio-edit frame to modify the selected item.
*
- * @returns {void}
+ * @return {void}
*/
editMedia: function editMedia() {
var control = this, mediaFrame, metadata, updateCallback;
diff --git a/src/js/_enqueues/wp/widgets/media-gallery.js b/src/js/_enqueues/wp/widgets/media-gallery.js
index 45671e7e8c..020e9787a0 100644
--- a/src/js/_enqueues/wp/widgets/media-gallery.js
+++ b/src/js/_enqueues/wp/widgets/media-gallery.js
@@ -21,7 +21,7 @@
* Create the default states.
*
* @since 4.9.0
- * @returns {void}
+ * @return {void}
*/
createStates: function createStates() {
this.states.add([
@@ -88,7 +88,7 @@
* @param {Backbone.Model} options.model - Model.
* @param {jQuery} options.el - Control field container element.
* @param {jQuery} options.syncContainer - Container element where fields are synced for the server.
- * @returns {void}
+ * @return {void}
*/
initialize: function initialize( options ) {
var control = this;
@@ -122,7 +122,7 @@
* Update the selected attachments if necessary.
*
* @since 4.9.0
- * @returns {void}
+ * @return {void}
*/
updateSelectedAttachments: function updateSelectedAttachments() {
var control = this, newIds, oldIds, removedIds, addedIds, addedQuery;
@@ -155,7 +155,7 @@
* Render preview.
*
* @since 4.9.0
- * @returns {void}
+ * @return {void}
*/
renderPreview: function renderPreview() {
var control = this, previewContainer, previewTemplate, data;
@@ -176,7 +176,7 @@
* Determine whether there are selected attachments.
*
* @since 4.9.0
- * @returns {boolean} Selected.
+ * @return {boolean} Selected.
*/
isSelected: function isSelected() {
var control = this;
@@ -192,7 +192,7 @@
* Open the media select frame to edit images.
*
* @since 4.9.0
- * @returns {void}
+ * @return {void}
*/
editMedia: function editMedia() {
var control = this, selection, mediaFrame, mediaFrameProps;
@@ -255,7 +255,7 @@
* Open the media select frame to chose an item.
*
* @since 4.9.0
- * @returns {void}
+ * @return {void}
*/
selectMedia: function selectMedia() {
var control = this, selection, mediaFrame, mediaFrameProps;
@@ -321,7 +321,7 @@
*
* @since 4.9.0
* @param {wp.media.models.Attachment} attachment - Attachment.
- * @returns {void}
+ * @return {void}
*/
handleAttachmentDestroy: function handleAttachmentDestroy( attachment ) {
var control = this;
diff --git a/src/js/_enqueues/wp/widgets/media-image.js b/src/js/_enqueues/wp/widgets/media-image.js
index 3ea4f9be74..7d15eff1f8 100644
--- a/src/js/_enqueues/wp/widgets/media-image.js
+++ b/src/js/_enqueues/wp/widgets/media-image.js
@@ -40,7 +40,7 @@
/**
* Render preview.
*
- * @returns {void}
+ * @return {void}
*/
renderPreview: function renderPreview() {
var control = this, previewContainer, previewTemplate, fieldsContainer, fieldsTemplate, linkInput;
@@ -64,7 +64,7 @@
/**
* Open the media image-edit frame to modify the selected item.
*
- * @returns {void}
+ * @return {void}
*/
editMedia: function editMedia() {
var control = this, mediaFrame, updateCallback, defaultSync, metadata;
@@ -119,7 +119,7 @@
/**
* Get props which are merged on top of the model when an embed is chosen (as opposed to an attachment).
*
- * @returns {Object} Reset/override props.
+ * @return {Object} Reset/override props.
*/
getEmbedResetProps: function getEmbedResetProps() {
return _.extend(
@@ -138,7 +138,7 @@
* Prevent the image_title attribute from being initially set when adding an image from the media library.
*
* @param {wp.media.view.MediaFrame.Select} mediaFrame - Select frame.
- * @returns {Object} Props.
+ * @return {Object} Props.
*/
getModelPropsFromMediaFrame: function getModelPropsFromMediaFrame( mediaFrame ) {
var control = this;
@@ -151,7 +151,7 @@
/**
* Map model props to preview template props.
*
- * @returns {Object} Preview template props.
+ * @return {Object} Preview template props.
*/
mapModelToPreviewTemplateProps: function mapModelToPreviewTemplateProps() {
var control = this, previewTemplateProps, url;
diff --git a/src/js/_enqueues/wp/widgets/media-video.js b/src/js/_enqueues/wp/widgets/media-video.js
index b716cce437..56a8ff1f3d 100644
--- a/src/js/_enqueues/wp/widgets/media-video.js
+++ b/src/js/_enqueues/wp/widgets/media-video.js
@@ -21,7 +21,7 @@
/**
* Create the default states.
*
- * @returns {void}
+ * @return {void}
*/
createStates: function createStates() {
this.states.add([
@@ -88,7 +88,7 @@
* Map model props to media frame props.
*
* @param {Object} modelProps - Model props.
- * @returns {Object} Media frame props.
+ * @return {Object} Media frame props.
*/
mapModelToMediaFrameProps: function mapModelToMediaFrameProps( modelProps ) {
var control = this, mediaFrameProps;
@@ -100,7 +100,7 @@
/**
* Fetches embed data for external videos.
*
- * @returns {void}
+ * @return {void}
*/
fetchEmbed: function fetchEmbed() {
var control = this, url;
@@ -144,7 +144,7 @@
*
* @deprecated since 4.9.
*
- * @returns {boolean} Whether url is a supported video host.
+ * @return {boolean} Whether url is a supported video host.
*/
isHostedVideo: function isHostedVideo() {
return true;
@@ -153,7 +153,7 @@
/**
* Render preview.
*
- * @returns {void}
+ * @return {void}
*/
renderPreview: function renderPreview() {
var control = this, previewContainer, previewTemplate, attachmentId, attachmentUrl, poster, html = '', isOEmbed = false, mime, error, urlParser, matches;
@@ -211,7 +211,7 @@
/**
* Open the media image-edit frame to modify the selected item.
*
- * @returns {void}
+ * @return {void}
*/
editMedia: function editMedia() {
var control = this, mediaFrame, metadata, updateCallback;
diff --git a/src/js/_enqueues/wp/widgets/media.js b/src/js/_enqueues/wp/widgets/media.js
index 9a243a914b..03d145093d 100644
--- a/src/js/_enqueues/wp/widgets/media.js
+++ b/src/js/_enqueues/wp/widgets/media.js
@@ -45,7 +45,7 @@ wp.mediaWidgets = ( function( $ ) {
*
* @param {Object} options - Options.
*
- * @returns {void}
+ * @return {void}
*/
initialize: function initialize( options ) {
_.bindAll( this, 'handleDisplaySettingChange' );
@@ -56,7 +56,7 @@ wp.mediaWidgets = ( function( $ ) {
* Sync changes to the current display settings back into the current customized.
*
* @param {Backbone.Model} displaySettings - Modified display settings.
- * @returns {void}
+ * @return {void}
*/
handleDisplaySettingChange: function handleDisplaySettingChange( displaySettings ) {
this.get( 'selectedDisplaySettings' ).set( displaySettings.attributes );
@@ -71,7 +71,7 @@ wp.mediaWidgets = ( function( $ ) {
* settings.
*
* @param {Backbone.Model} model - Display settings model.
- * @returns {Backbone.Model} Display settings model.
+ * @return {Backbone.Model} Display settings model.
*/
display: function getDisplaySettingsModel( model ) {
var display, selectedDisplaySettings = this.get( 'selectedDisplaySettings' );
@@ -101,7 +101,7 @@ wp.mediaWidgets = ( function( $ ) {
* @since 4.9.0
*
* @param {object} options - Options.
- * @returns {void}
+ * @return {void}
*/
initialize: function( options ) {
var view = this, embedController; // eslint-disable-line consistent-this
@@ -117,7 +117,7 @@ wp.mediaWidgets = ( function( $ ) {
*
* Forked override of {wp.media.view.Embed#refresh()} to suppress irrelevant "link text" field.
*
- * @returns {void}
+ * @return {void}
*/
refresh: function refresh() {
/**
@@ -136,7 +136,7 @@ wp.mediaWidgets = ( function( $ ) {
* Set the disabled state on the Add to Widget button.
*
* @param {boolean} disabled - Disabled.
- * @returns {void}
+ * @return {void}
*/
setAddToWidgetButtonDisabled: function setAddToWidgetButtonDisabled( disabled ) {
this.views.parent.views.parent.views.get( '.media-frame-toolbar' )[0].$el.find( '.media-button-select' ).prop( 'disabled', disabled );
@@ -146,7 +146,7 @@ wp.mediaWidgets = ( function( $ ) {
* Set or clear an error notice.
*
* @param {string} notice - Notice.
- * @returns {void}
+ * @return {void}
*/
setErrorNotice: function setErrorNotice( notice ) {
var embedLinkView = this, noticeContainer; // eslint-disable-line consistent-this
@@ -175,7 +175,7 @@ wp.mediaWidgets = ( function( $ ) {
*
* @since 4.9.0
*
- * @returns {void}
+ * @return {void}
*/
updateoEmbed: function() {
var embedLinkView = this, url; // eslint-disable-line consistent-this
@@ -200,7 +200,7 @@ wp.mediaWidgets = ( function( $ ) {
/**
* Fetch media.
*
- * @returns {void}
+ * @return {void}
*/
fetch: function() {
var embedLinkView = this, fetchSuccess, matches, fileExt, urlParser, url, re, youTubeEmbedMatch; // eslint-disable-line consistent-this
@@ -276,7 +276,7 @@ wp.mediaWidgets = ( function( $ ) {
* The element is getting display:none in the stylesheet, but the underlying method uses
* uses {jQuery.fn.show()} which adds an inline style. This avoids the need for !important.
*
- * @returns {void}
+ * @return {void}
*/
renderFail: function renderFail() {
var embedLinkView = this; // eslint-disable-line consistent-this
@@ -306,7 +306,7 @@ wp.mediaWidgets = ( function( $ ) {
/**
* Create the default states.
*
- * @returns {void}
+ * @return {void}
*/
createStates: function createStates() {
var mime = this.options.mimeType, specificMimes = [];
@@ -358,7 +358,7 @@ wp.mediaWidgets = ( function( $ ) {
*
* @param {wp.Backbone.View} view - Toolbar view.
* @this {wp.media.controller.Library}
- * @returns {void}
+ * @return {void}
*/
mainInsertToolbar: function mainInsertToolbar( view ) {
var controller = this; // eslint-disable-line consistent-this
@@ -374,7 +374,7 @@ wp.mediaWidgets = ( function( $ ) {
* @ignore
*
* @fires wp.media.controller.State#insert()
- * @returns {void}
+ * @return {void}
*/
click: function onClick() {
var state = controller.state(),
@@ -393,7 +393,7 @@ wp.mediaWidgets = ( function( $ ) {
*
* @param {wp.Backbone.View} toolbar - Toolbar view.
* @this {wp.media.controller.Library}
- * @returns {void}
+ * @return {void}
*/
mainEmbedToolbar: function mainEmbedToolbar( toolbar ) {
toolbar.view = new wp.media.view.Toolbar.Embed({
@@ -408,7 +408,7 @@ wp.mediaWidgets = ( function( $ ) {
*
* Forked override of {wp.media.view.MediaFrame.Post#embedContent()} to suppress irrelevant "link text" field.
*
- * @returns {void}
+ * @return {void}
*/
embedContent: function embedContent() {
var view = new component.MediaEmbedView({
@@ -489,7 +489,7 @@ wp.mediaWidgets = ( function( $ ) {
* @param {jQuery} options.el - Control field container element.
* @param {jQuery} options.syncContainer - Container element where fields are synced for the server.
*
- * @returns {void}
+ * @return {void}
*/
initialize: function initialize( options ) {
var control = this;
@@ -593,7 +593,7 @@ wp.mediaWidgets = ( function( $ ) {
/**
* Update the selected attachment if necessary.
*
- * @returns {void}
+ * @return {void}
*/
updateSelectedAttachment: function updateSelectedAttachment() {
var control = this, attachment;
@@ -619,7 +619,7 @@ wp.mediaWidgets = ( function( $ ) {
/**
* Sync the model attributes to the hidden inputs, and update previewTemplateProps.
*
- * @returns {void}
+ * @return {void}
*/
syncModelToPreviewProps: function syncModelToPreviewProps() {
var control = this;
@@ -629,7 +629,7 @@ wp.mediaWidgets = ( function( $ ) {
/**
* Sync the model attributes to the hidden inputs, and update previewTemplateProps.
*
- * @returns {void}
+ * @return {void}
*/
syncModelToInputs: function syncModelToInputs() {
var control = this;
@@ -659,7 +659,7 @@ wp.mediaWidgets = ( function( $ ) {
/**
* Get template.
*
- * @returns {Function} Template.
+ * @return {Function} Template.
*/
template: function template() {
var control = this;
@@ -672,7 +672,7 @@ wp.mediaWidgets = ( function( $ ) {
/**
* Render template.
*
- * @returns {void}
+ * @return {void}
*/
render: function render() {
var control = this, titleInput;
@@ -695,7 +695,7 @@ wp.mediaWidgets = ( function( $ ) {
* Render media preview.
*
* @abstract
- * @returns {void}
+ * @return {void}
*/
renderPreview: function renderPreview() {
throw new Error( 'renderPreview must be implemented' );
@@ -704,7 +704,7 @@ wp.mediaWidgets = ( function( $ ) {
/**
* Whether a media item is selected.
*
- * @returns {boolean} Whether selected and no error.
+ * @return {boolean} Whether selected and no error.
*/
isSelected: function isSelected() {
var control = this;
@@ -720,7 +720,7 @@ wp.mediaWidgets = ( function( $ ) {
* Handle click on link to Media Library to open modal, such as the link that appears when in the missing attachment error notice.
*
* @param {jQuery.Event} event - Event.
- * @returns {void}
+ * @return {void}
*/
handleMediaLibraryLinkClick: function handleMediaLibraryLinkClick( event ) {
var control = this;
@@ -731,7 +731,7 @@ wp.mediaWidgets = ( function( $ ) {
/**
* Open the media select frame to chose an item.
*
- * @returns {void}
+ * @return {void}
*/
selectMedia: function selectMedia() {
var control = this, selection, mediaFrame, defaultSync, mediaFrameProps, selectionModels = [];
@@ -818,7 +818,7 @@ wp.mediaWidgets = ( function( $ ) {
* Get the instance props from the media selection frame.
*
* @param {wp.media.view.MediaFrame.Select} mediaFrame - Select frame.
- * @returns {Object} Props.
+ * @return {Object} Props.
*/
getModelPropsFromMediaFrame: function getModelPropsFromMediaFrame( mediaFrame ) {
var control = this, state, mediaFrameProps, modelProps;
@@ -867,7 +867,7 @@ wp.mediaWidgets = ( function( $ ) {
* Map media frame props to model props.
*
* @param {Object} mediaFrameProps - Media frame props.
- * @returns {Object} Model props.
+ * @return {Object} Model props.
*/
mapMediaToModelProps: function mapMediaToModelProps( mediaFrameProps ) {
var control = this, mediaFramePropToModelPropMap = {}, modelProps = {}, extension;
@@ -918,7 +918,7 @@ wp.mediaWidgets = ( function( $ ) {
* Map model props to media frame props.
*
* @param {Object} modelProps - Model props.
- * @returns {Object} Media frame props.
+ * @return {Object} Media frame props.
*/
mapModelToMediaFrameProps: function mapModelToMediaFrameProps( modelProps ) {
var control = this, mediaFrameProps = {};
@@ -942,7 +942,7 @@ wp.mediaWidgets = ( function( $ ) {
/**
* Map model props to previewTemplateProps.
*
- * @returns {Object} Preview Template Props.
+ * @return {Object} Preview Template Props.
*/
mapModelToPreviewTemplateProps: function mapModelToPreviewTemplateProps() {
var control = this, previewTemplateProps = {};
@@ -961,7 +961,7 @@ wp.mediaWidgets = ( function( $ ) {
* Open the media frame to modify the selected item.
*
* @abstract
- * @returns {void}
+ * @return {void}
*/
editMedia: function editMedia() {
throw new Error( 'editMedia not implemented' );
@@ -1009,7 +1009,7 @@ wp.mediaWidgets = ( function( $ ) {
/**
* Get default attribute values.
*
- * @returns {Object} Mapping of property names to their default values.
+ * @return {Object} Mapping of property names to their default values.
*/
defaults: function() {
var defaults = {};
@@ -1029,7 +1029,7 @@ wp.mediaWidgets = ( function( $ ) {
* @param {string|Object} key - Attribute name or attribute pairs.
* @param {mixed|Object} [val] - Attribute value or options object.
* @param {Object} [options] - Options when attribute name and value are passed separately.
- * @returns {wp.mediaWidgets.MediaWidgetModel} This model.
+ * @return {wp.mediaWidgets.MediaWidgetModel} This model.
*/
set: function set( key, val, options ) {
var model = this, attrs, opts, castedAttrs; // eslint-disable-line consistent-this
@@ -1083,7 +1083,7 @@ wp.mediaWidgets = ( function( $ ) {
/**
* Get props which are merged on top of the model when an embed is chosen (as opposed to an attachment).
*
- * @returns {Object} Reset/override props.
+ * @return {Object} Reset/override props.
*/
getEmbedResetProps: function getEmbedResetProps() {
return {
@@ -1120,7 +1120,7 @@ wp.mediaWidgets = ( function( $ ) {
* @param {jQuery.Event} event - Event.
* @param {jQuery} widgetContainer - Widget container element.
*
- * @returns {void}
+ * @return {void}
*/
component.handleWidgetAdded = function handleWidgetAdded( event, widgetContainer ) {
var fieldContainer, syncContainer, widgetForm, idBase, ControlConstructor, ModelConstructor, modelAttributes, widgetControl, widgetModel, widgetId, animatedCheckDelay = 50, renderWhenAnimationDone;
@@ -1203,7 +1203,7 @@ wp.mediaWidgets = ( function( $ ) {
*
* @memberOf wp.mediaWidgets
*
- * @returns {void}
+ * @return {void}
*/
component.setupAccessibleMode = function setupAccessibleMode() {
var widgetForm, widgetId, idBase, widgetControl, ControlConstructor, ModelConstructor, modelAttributes, fieldContainer, syncContainer;
@@ -1257,7 +1257,7 @@ wp.mediaWidgets = ( function( $ ) {
* @param {jQuery.Event} event - Event.
* @param {jQuery} widgetContainer - Widget container element.
*
- * @returns {void}
+ * @return {void}
*/
component.handleWidgetUpdated = function handleWidgetUpdated( event, widgetContainer ) {
var widgetForm, widgetContent, widgetId, widgetControl, attributes = {};
@@ -1291,7 +1291,7 @@ wp.mediaWidgets = ( function( $ ) {
*
* @memberOf wp.mediaWidgets
*
- * @returns {void}
+ * @return {void}
*/
component.init = function init() {
var $document = $( document );
diff --git a/src/js/_enqueues/wp/widgets/text.js b/src/js/_enqueues/wp/widgets/text.js
index 184e7242e6..63d4d40555 100644
--- a/src/js/_enqueues/wp/widgets/text.js
+++ b/src/js/_enqueues/wp/widgets/text.js
@@ -36,7 +36,7 @@ wp.textWidgets = ( function( $ ) {
* @param {jQuery} options.el - Control field container element.
* @param {jQuery} options.syncContainer - Container element where fields are synced for the server.
*
- * @returns {void}
+ * @return {void}
*/
initialize: function initialize( options ) {
var control = this;
@@ -105,7 +105,7 @@ wp.textWidgets = ( function( $ ) {
* @since 4.8.1
*
* @param {Array} pointers Pointer IDs to dismiss.
- * @returns {void}
+ * @return {void}
*/
dismissPointers: function dismissPointers( pointers ) {
_.each( pointers, function( pointer ) {
@@ -120,7 +120,7 @@ wp.textWidgets = ( function( $ ) {
* Open available widgets panel.
*
* @since 4.8.1
- * @returns {void}
+ * @return {void}
*/
openAvailableWidgetsPanel: function openAvailableWidgetsPanel() {
var sidebarControl;
@@ -145,7 +145,7 @@ wp.textWidgets = ( function( $ ) {
* A field will only be updated if it is not currently focused, to avoid
* overwriting content that the user is entering.
*
- * @returns {void}
+ * @return {void}
*/
updateFields: function updateFields() {
var control = this, syncInput;
@@ -168,7 +168,7 @@ wp.textWidgets = ( function( $ ) {
/**
* Initialize editor.
*
- * @returns {void}
+ * @return {void}
*/
initializeEditor: function initializeEditor() {
var control = this, changeDebounceDelay = 1000, id, textarea, triggerChangeIfDirty, restoreTextMode = false, needsTextareaChangeTrigger = false, previousValue;
@@ -179,7 +179,7 @@ wp.textWidgets = ( function( $ ) {
/**
* Trigger change if dirty.
*
- * @returns {void}
+ * @return {void}
*/
triggerChangeIfDirty = function() {
var updateWidgetBuffer = 300; // See wp.customize.Widgets.WidgetControl._setupUpdateUI() which uses 250ms for updateWidgetDebounced.
@@ -225,7 +225,7 @@ wp.textWidgets = ( function( $ ) {
/**
* Build (or re-build) the visual editor.
*
- * @returns {void}
+ * @return {void}
*/
function buildEditor() {
var editor, onInit, showPointerElement;
@@ -274,7 +274,7 @@ wp.textWidgets = ( function( $ ) {
* Show a pointer, focus on dismiss, and speak the contents for a11y.
*
* @param {jQuery} pointerElement Pointer element.
- * @returns {void}
+ * @return {void}
*/
showPointerElement = function( pointerElement ) {
pointerElement.show();
@@ -377,7 +377,7 @@ wp.textWidgets = ( function( $ ) {
* @param {jQuery.Event} event - Event.
* @param {jQuery} widgetContainer - Widget container element.
*
- * @returns {void}
+ * @return {void}
*/
component.handleWidgetAdded = function handleWidgetAdded( event, widgetContainer ) {
var widgetForm, idBase, widgetControl, widgetId, animatedCheckDelay = 50, renderWhenAnimationDone, fieldContainer, syncContainer;
@@ -442,7 +442,7 @@ wp.textWidgets = ( function( $ ) {
*
* @memberOf wp.textWidgets
*
- * @returns {void}
+ * @return {void}
*/
component.setupAccessibleMode = function setupAccessibleMode() {
var widgetForm, idBase, widgetControl, fieldContainer, syncContainer;
@@ -484,7 +484,7 @@ wp.textWidgets = ( function( $ ) {
*
* @param {jQuery.Event} event - Event.
* @param {jQuery} widgetContainer - Widget container element.
- * @returns {void}
+ * @return {void}
*/
component.handleWidgetUpdated = function handleWidgetUpdated( event, widgetContainer ) {
var widgetForm, widgetId, widgetControl, idBase;
@@ -513,7 +513,7 @@ wp.textWidgets = ( function( $ ) {
*
* @memberOf wp.textWidgets
*
- * @returns {void}
+ * @return {void}
*/
component.init = function init() {
var $document = $( document );
diff --git a/src/js/media/controllers/cropper.js b/src/js/media/controllers/cropper.js
index 3418064a61..ef16752db4 100644
--- a/src/js/media/controllers/cropper.js
+++ b/src/js/media/controllers/cropper.js
@@ -31,7 +31,7 @@ Cropper = wp.media.controller.State.extend(/** @lends wp.media.controller.Croppe
*
* @since 4.2.0
*
- * @returns {void}
+ * @return {void}
*/
activate: function() {
this.frame.on( 'content:create:crop', this.createCropContent, this );
@@ -44,7 +44,7 @@ Cropper = wp.media.controller.State.extend(/** @lends wp.media.controller.Croppe
*
* @since 4.2.0
*
- * @returns {void}
+ * @return {void}
*/
deactivate: function() {
this.frame.toolbar.mode('browse');
@@ -59,7 +59,7 @@ Cropper = wp.media.controller.State.extend(/** @lends wp.media.controller.Croppe
*
* @fires crop window
*
- * @returns {void}
+ * @return {void}
*/
createCropContent: function() {
this.cropperView = new wp.media.view.Cropper({
@@ -76,7 +76,7 @@ Cropper = wp.media.controller.State.extend(/** @lends wp.media.controller.Croppe
*
* @since 4.2.0
*
- * @returns {void}
+ * @return {void}
*/
removeCropper: function() {
this.imgSelect.cancelSelection();
@@ -90,7 +90,7 @@ Cropper = wp.media.controller.State.extend(/** @lends wp.media.controller.Croppe
*
* @since 4.2.0
*
- * @returns {void}
+ * @return {void}
*/
createCropToolbar: function() {
var canSkipCrop, toolbarOptions;
@@ -152,7 +152,7 @@ Cropper = wp.media.controller.State.extend(/** @lends wp.media.controller.Croppe
*
* @since 4.2.0
*
- * @returns {$.promise} A jQuery promise with the custom header crop details.
+ * @return {$.promise} A jQuery promise with the custom header crop details.
*/
doCrop: function( attachment ) {
return wp.ajax.post( 'custom-header-crop', _.extend(
diff --git a/src/js/media/controllers/customize-image-cropper.js b/src/js/media/controllers/customize-image-cropper.js
index a9c2e9fc90..06346a95f8 100644
--- a/src/js/media/controllers/customize-image-cropper.js
+++ b/src/js/media/controllers/customize-image-cropper.js
@@ -22,7 +22,7 @@ CustomizeImageCropper = Controller.Cropper.extend(/** @lends wp.media.controller
*
* @param {Object} attachment The attachment to crop.
*
- * @returns {$.promise} A jQuery promise that represents the crop image request.
+ * @return {$.promise} A jQuery promise that represents the crop image request.
*/
doCrop: function( attachment ) {
var cropDetails = attachment.get( 'cropDetails' ),
diff --git a/src/js/media/controllers/edit-image.js b/src/js/media/controllers/edit-image.js
index e83eaea613..cdc29487df 100644
--- a/src/js/media/controllers/edit-image.js
+++ b/src/js/media/controllers/edit-image.js
@@ -36,7 +36,7 @@ EditImage = wp.media.controller.State.extend(/** @lends wp.media.controller.Edit
*
* @since 3.9.0
*
- * @returns {void}
+ * @return {void}
*/
activate: function() {
this.frame.on( 'toolbar:render:edit-image', _.bind( this.toolbar, this ) );
@@ -47,7 +47,7 @@ EditImage = wp.media.controller.State.extend(/** @lends wp.media.controller.Edit
*
* @since 3.9.0
*
- * @returns {void}
+ * @return {void}
*/
deactivate: function() {
this.frame.off( 'toolbar:render:edit-image' );
@@ -62,7 +62,7 @@ EditImage = wp.media.controller.State.extend(/** @lends wp.media.controller.Edit
*
* @since 3.9.0
*
- * @returns {void}
+ * @return {void}
*/
toolbar: function() {
var frame = this.frame,
diff --git a/src/js/media/controllers/gallery-add.js b/src/js/media/controllers/gallery-add.js
index eb61df7cb1..adfb426816 100644
--- a/src/js/media/controllers/gallery-add.js
+++ b/src/js/media/controllers/gallery-add.js
@@ -55,7 +55,7 @@ GalleryAdd = Library.extend(/** @lends wp.media.controller.GalleryAdd.prototype
*
* @since 3.5.0
*
- * @returns {void}
+ * @return {void}
*/
initialize: function() {
if ( ! this.get('library') ) {
@@ -73,7 +73,7 @@ GalleryAdd = Library.extend(/** @lends wp.media.controller.GalleryAdd.prototype
*
* @since 3.5.0
*
- * @returns {void}
+ * @return {void}
*/
activate: function() {
var library = this.get('library'),
diff --git a/src/js/media/controllers/library.js b/src/js/media/controllers/library.js
index 8223fda517..923f3dd7d8 100644
--- a/src/js/media/controllers/library.js
+++ b/src/js/media/controllers/library.js
@@ -153,7 +153,7 @@ Library = wp.media.controller.State.extend(/** @lends wp.media.controller.Librar
* @since 3.5.0
*
* @param {wp.media.model.Attachment} attachment
- * @returns {Backbone.Model}
+ * @return {Backbone.Model}
*/
display: function( attachment ) {
var displays = this._displays;
@@ -170,7 +170,7 @@ Library = wp.media.controller.State.extend(/** @lends wp.media.controller.Librar
* @since 3.6.0
*
* @param {wp.media.model.Attachment} attachment
- * @returns {Object}
+ * @return {Object}
*/
defaultDisplaySettings: function( attachment ) {
var settings = _.clone( this._defaultDisplaySettings );
@@ -190,7 +190,7 @@ Library = wp.media.controller.State.extend(/** @lends wp.media.controller.Librar
* @since 4.4.1
*
* @param {wp.media.model.Attachment} attachment
- * @returns {Boolean}
+ * @return {Boolean}
*/
isImageAttachment: function( attachment ) {
// If uploading, we know the filename but not the mime type.
@@ -207,7 +207,7 @@ Library = wp.media.controller.State.extend(/** @lends wp.media.controller.Librar
* @since 3.6.0
*
* @param {wp.media.model.Attachment} attachment
- * @returns {Boolean}
+ * @return {Boolean}
*/
canEmbed: function( attachment ) {
// If uploading, we know the filename but not the mime type.
diff --git a/src/js/media/controllers/region.js b/src/js/media/controllers/region.js
index 0973e68d0c..26d47808e6 100644
--- a/src/js/media/controllers/region.js
+++ b/src/js/media/controllers/region.js
@@ -38,7 +38,7 @@ _.extend( Region.prototype,/** @lends wp.media.controller.Region.prototype */{
* @fires Region#activate
* @fires Region#deactivate
*
- * @returns {wp.media.controller.Region} Returns itself to allow chaining.
+ * @return {wp.media.controller.Region} Returns itself to allow chaining.
*/
mode: function( mode ) {
if ( ! mode ) {
@@ -77,7 +77,7 @@ _.extend( Region.prototype,/** @lends wp.media.controller.Region.prototype */{
* @fires Region#create
* @fires Region#render
*
- * @returns {wp.media.controller.Region} Returns itself to allow chaining.
+ * @return {wp.media.controller.Region} Returns itself to allow chaining.
*/
render: function( mode ) {
// If the mode isn't active, activate it.
@@ -120,7 +120,7 @@ _.extend( Region.prototype,/** @lends wp.media.controller.Region.prototype */{
*
* @since 3.5.0
*
- * @returns {wp.media.View}
+ * @return {wp.media.View}
*/
get: function() {
return this.view.views.first( this.selector );
@@ -133,7 +133,7 @@ _.extend( Region.prototype,/** @lends wp.media.controller.Region.prototype */{
*
* @param {Array|Object} views
* @param {Object} [options={}]
- * @returns {wp.Backbone.Subviews} Subviews is returned to allow chaining.
+ * @return {wp.Backbone.Subviews} Subviews is returned to allow chaining.
*/
set: function( views, options ) {
if ( options ) {
@@ -148,7 +148,7 @@ _.extend( Region.prototype,/** @lends wp.media.controller.Region.prototype */{
* @since 3.5.0
*
* @param {string} event
- * @returns {undefined|wp.media.controller.Region} Returns itself to allow chaining.
+ * @return {undefined|wp.media.controller.Region} Returns itself to allow chaining.
*/
trigger: function( event ) {
var base, args;
diff --git a/src/js/media/controllers/state-machine.js b/src/js/media/controllers/state-machine.js
index 9ddeca5da4..50ebb10e6c 100644
--- a/src/js/media/controllers/state-machine.js
+++ b/src/js/media/controllers/state-machine.js
@@ -31,13 +31,13 @@ _.extend( StateMachine.prototype, Backbone.Events,/** @lends wp.media.controller
* Implicitly creates states.
*
* Ensure that the `states` collection exists so the `StateMachine`
- * can be used as a mixin.
+ * can be used as a mixin.
*
* @since 3.5.0
*
* @param {string} id
- * @returns {wp.media.controller.State} Returns a State model
- * from the StateMachine collection
+ * @return {wp.media.controller.State} Returns a State model from
+ * the StateMachine collection.
*/
state: function( id ) {
this.states = this.states || new Backbone.Collection();
@@ -65,7 +65,7 @@ _.extend( StateMachine.prototype, Backbone.Events,/** @lends wp.media.controller
* @fires wp.media.controller.State#deactivate
* @fires wp.media.controller.State#activate
*
- * @returns {wp.media.controller.StateMachine} Returns itself to allow chaining.
+ * @return {wp.media.controller.StateMachine} Returns itself to allow chaining.
*/
setState: function( id ) {
var previous = this.state();
@@ -93,8 +93,8 @@ _.extend( StateMachine.prototype, Backbone.Events,/** @lends wp.media.controller
*
* @since 3.5.0
*
- * @returns {wp.media.controller.State} Returns a State model
- * from the StateMachine collection
+ * @return {wp.media.controller.State} Returns a State model from
+ * the StateMachine collection.
*/
lastState: function() {
if ( this._lastState ) {
@@ -109,19 +109,19 @@ _.each([ 'on', 'off', 'trigger' ], function( method ) {
* @function on
* @memberOf wp.media.controller.StateMachine
* @instance
- * @returns {wp.media.controller.StateMachine} Returns itself to allow chaining.
+ * @return {wp.media.controller.StateMachine} Returns itself to allow chaining.
*/
/**
* @function off
* @memberOf wp.media.controller.StateMachine
* @instance
- * @returns {wp.media.controller.StateMachine} Returns itself to allow chaining.
+ * @return {wp.media.controller.StateMachine} Returns itself to allow chaining.
*/
/**
* @function trigger
* @memberOf wp.media.controller.StateMachine
* @instance
- * @returns {wp.media.controller.StateMachine} Returns itself to allow chaining.
+ * @return {wp.media.controller.StateMachine} Returns itself to allow chaining.
*/
StateMachine.prototype[ method ] = function() {
// Ensure that the `states` collection exists so the `StateMachine`
diff --git a/src/js/media/models/attachment.js b/src/js/media/models/attachment.js
index 38f55187ad..cd29d2f98e 100644
--- a/src/js/media/models/attachment.js
+++ b/src/js/media/models/attachment.js
@@ -18,7 +18,7 @@ Attachment = Backbone.Model.extend(/** @lends wp.media.model.Attachment.prototyp
* @param {wp.media.model.Attachment} model
* @param {Object} [options={}]
*
- * @returns {Promise}
+ * @return {Promise}
*/
sync: function( method, model, options ) {
// If the attachment does not yet have an `id`, return an instantly
@@ -100,8 +100,8 @@ Attachment = Backbone.Model.extend(/** @lends wp.media.model.Attachment.prototyp
* Convert date strings into Date objects.
*
* @param {Object} resp The raw response object, typically returned by fetch()
- * @returns {Object} The modified response object, which is the attributes hash
- * to be set on the model.
+ * @return {Object} The modified response object, which is the attributes hash
+ * to be set on the model.
*/
parse: function( resp ) {
if ( ! resp ) {
@@ -118,7 +118,7 @@ Attachment = Backbone.Model.extend(/** @lends wp.media.model.Attachment.prototyp
*
* @this Backbone.Model
*
- * @returns {Promise}
+ * @return {Promise}
*/
saveCompat: function( data, options ) {
var model = this;
@@ -143,7 +143,7 @@ Attachment = Backbone.Model.extend(/** @lends wp.media.model.Attachment.prototyp
* @static
*
* @param {Object} attrs
- * @returns {wp.media.model.Attachment}
+ * @return {wp.media.model.Attachment}
*/
create: function( attrs ) {
var Attachments = wp.media.model.Attachments;
@@ -158,7 +158,7 @@ Attachment = Backbone.Model.extend(/** @lends wp.media.model.Attachment.prototyp
* @static
* @param {string} id A string used to identify a model.
* @param {Backbone.Model|undefined} attachment
- * @returns {wp.media.model.Attachment}
+ * @return {wp.media.model.Attachment}
*/
get: _.memoize( function( id, attachment ) {
var Attachments = wp.media.model.Attachments;
diff --git a/src/js/media/models/attachments.js b/src/js/media/models/attachments.js
index d0234e52f1..ed46588189 100644
--- a/src/js/media/models/attachments.js
+++ b/src/js/media/models/attachments.js
@@ -148,7 +148,7 @@ var Attachments = Backbone.Collection.extend(/** @lends wp.media.model.Attachmen
* Checks whether an attachment is valid.
*
* @param {wp.media.model.Attachment} attachment
- * @returns {Boolean}
+ * @return {Boolean}
*/
validator: function( attachment ) {
@@ -172,7 +172,7 @@ var Attachments = Backbone.Collection.extend(/** @lends wp.media.model.Attachmen
*
* @param {wp.media.model.Attachment} attachment
* @param {Object} options
- * @returns {wp.media.model.Attachments} Returns itself to allow chaining.
+ * @return {wp.media.model.Attachments} Returns itself to allow chaining.
*/
validate: function( attachment, options ) {
var valid = this.validator( attachment ),
@@ -195,7 +195,7 @@ var Attachments = Backbone.Collection.extend(/** @lends wp.media.model.Attachmen
*
* @fires wp.media.model.Attachments#reset
*
- * @returns {wp.media.model.Attachments} Returns itself to allow chaining.
+ * @return {wp.media.model.Attachments} Returns itself to allow chaining.
*/
validateAll: function( attachments, options ) {
options = options || {};
@@ -214,7 +214,7 @@ var Attachments = Backbone.Collection.extend(/** @lends wp.media.model.Attachmen
* and replicate them on this collection.
*
* @param {wp.media.model.Attachments} The attachments collection to observe.
- * @returns {wp.media.model.Attachments} Returns itself to allow chaining.
+ * @return {wp.media.model.Attachments} Returns itself to allow chaining.
*/
observe: function( attachments ) {
this.observers = this.observers || [];
@@ -229,7 +229,7 @@ var Attachments = Backbone.Collection.extend(/** @lends wp.media.model.Attachmen
* Stop replicating collection change events from another attachments collection.
*
* @param {wp.media.model.Attachments} The attachments collection to stop observing.
- * @returns {wp.media.model.Attachments} Returns itself to allow chaining.
+ * @return {wp.media.model.Attachments} Returns itself to allow chaining.
*/
unobserve: function( attachments ) {
if ( attachments ) {
@@ -252,7 +252,7 @@ var Attachments = Backbone.Collection.extend(/** @lends wp.media.model.Attachmen
* @param {wp.media.model.Attachments} attachments
* @param {Object} options
*
- * @returns {wp.media.model.Attachments} Returns itself to allow chaining.
+ * @return {wp.media.model.Attachments} Returns itself to allow chaining.
*/
_validateHandler: function( attachment, attachments, options ) {
// If we're not mirroring this `attachments` collection,
@@ -268,7 +268,7 @@ var Attachments = Backbone.Collection.extend(/** @lends wp.media.model.Attachmen
*
* @param {wp.media.model.Attachments} attachments
* @param {Object} options
- * @returns {wp.media.model.Attachments} Returns itself to allow chaining.
+ * @return {wp.media.model.Attachments} Returns itself to allow chaining.
*/
_validateAllHandler: function( attachments, options ) {
return this.validateAll( attachments, options );
@@ -278,7 +278,7 @@ var Attachments = Backbone.Collection.extend(/** @lends wp.media.model.Attachmen
* in the collection.
*
* @param {wp.media.model.Attachments} The attachments collection to mirror.
- * @returns {wp.media.model.Attachments} Returns itself to allow chaining.
+ * @return {wp.media.model.Attachments} Returns itself to allow chaining.
*/
mirror: function( attachments ) {
if ( this.mirroring && this.mirroring === attachments ) {
@@ -316,7 +316,7 @@ var Attachments = Backbone.Collection.extend(/** @lends wp.media.model.Attachmen
* server persistence by itself.
*
* @param {object} options
- * @returns {Promise}
+ * @return {Promise}
*/
more: function( options ) {
var deferred = jQuery.Deferred(),
@@ -349,7 +349,7 @@ var Attachments = Backbone.Collection.extend(/** @lends wp.media.model.Attachmen
* and forwards to its `hasMore` method. This collection class doesn't have
* server persistence by itself.
*
- * @returns {boolean}
+ * @return {boolean}
*/
hasMore: function() {
return this.mirroring ? this.mirroring.hasMore() : false;
@@ -361,7 +361,7 @@ var Attachments = Backbone.Collection.extend(/** @lends wp.media.model.Attachmen
*
* @param {Object|Array} resp The raw response Object/Array.
* @param {Object} xhr
- * @returns {Array} The array of model attributes to be added to the collection
+ * @return {Array} The array of model attributes to be added to the collection
*/
parse: function( resp, xhr ) {
if ( ! _.isArray( resp ) ) {
@@ -405,7 +405,7 @@ var Attachments = Backbone.Collection.extend(/** @lends wp.media.model.Attachmen
* If this collection is sorted by `menuOrder`, recalculates and saves
* the menu order to the database.
*
- * @returns {undefined|Promise}
+ * @return {undefined|Promise}
*/
saveMenuOrder: function() {
if ( 'menuOrder' !== this.props.get('orderby') ) {
@@ -444,9 +444,9 @@ var Attachments = Backbone.Collection.extend(/** @lends wp.media.model.Attachmen
* @param {Backbone.Model} a
* @param {Backbone.Model} b
* @param {Object} options
- * @returns {Number} -1 if the first model should come before the second,
- * 0 if they are of the same rank and
- * 1 if the first model should come after.
+ * @return {Number} -1 if the first model should come before the second,
+ * 0 if they are of the same rank and
+ * 1 if the first model should come after.
*/
comparator: function( a, b, options ) {
var key = this.props.get('orderby'),
@@ -480,7 +480,7 @@ var Attachments = Backbone.Collection.extend(/** @lends wp.media.model.Attachmen
*
* @this wp.media.model.Attachments
*
- * @returns {Boolean}
+ * @return {Boolean}
*/
search: function( attachment ) {
if ( ! this.props.get('search') ) {
@@ -498,7 +498,7 @@ var Attachments = Backbone.Collection.extend(/** @lends wp.media.model.Attachmen
*
* @this wp.media.model.Attachments
*
- * @returns {Boolean}
+ * @return {Boolean}
*/
type: function( attachment ) {
var type = this.props.get('type'), atts = attachment.toJSON(), mime, found;
@@ -525,7 +525,7 @@ var Attachments = Backbone.Collection.extend(/** @lends wp.media.model.Attachmen
*
* @this wp.media.model.Attachments
*
- * @returns {Boolean}
+ * @return {Boolean}
*/
uploadedTo: function( attachment ) {
var uploadedTo = this.props.get('uploadedTo');
@@ -541,7 +541,7 @@ var Attachments = Backbone.Collection.extend(/** @lends wp.media.model.Attachmen
*
* @this wp.media.model.Attachments
*
- * @returns {Boolean}
+ * @return {Boolean}
*/
status: function( attachment ) {
var status = this.props.get('status');
diff --git a/src/js/media/models/query.js b/src/js/media/models/query.js
index 560e54944d..90e36e6cc7 100644
--- a/src/js/media/models/query.js
+++ b/src/js/media/models/query.js
@@ -80,7 +80,7 @@ Query = Attachments.extend(/** @lends wp.media.model.Query.prototype */{
* Whether there are more attachments that haven't been sync'd from the server
* that match the collection's query.
*
- * @returns {boolean}
+ * @return {boolean}
*/
hasMore: function() {
return this._hasMore;
@@ -89,7 +89,7 @@ Query = Attachments.extend(/** @lends wp.media.model.Query.prototype */{
* Fetch more attachments from the server for the collection.
*
* @param {object} [options={}]
- * @returns {Promise}
+ * @return {Promise}
*/
more: function( options ) {
var query = this;
@@ -119,7 +119,7 @@ Query = Attachments.extend(/** @lends wp.media.model.Query.prototype */{
* @param {String} method
* @param {Backbone.Model} model
* @param {Object} [options={}]
- * @returns {Promise}
+ * @return {Promise}
*/
sync: function( method, model, options ) {
var args, fallback;
@@ -221,7 +221,7 @@ Query = Attachments.extend(/** @lends wp.media.model.Query.prototype */{
* @param {Object} [props.author]
* @param {Object} [options]
*
- * @returns {wp.media.model.Query} A new Attachments Query collection.
+ * @return {wp.media.model.Query} A new Attachments Query collection.
*/
get: (function(){
/**
@@ -231,7 +231,7 @@ Query = Attachments.extend(/** @lends wp.media.model.Query.prototype */{
var queries = [];
/**
- * @returns {Query}
+ * @return {Query}
*/
return function( props, options ) {
var args = {},
diff --git a/src/js/media/models/selection.js b/src/js/media/models/selection.js
index 894545f0fb..a2fc899c8b 100644
--- a/src/js/media/models/selection.js
+++ b/src/js/media/models/selection.js
@@ -37,7 +37,7 @@ Selection = Attachments.extend(/** @lends wp.media.model.Selection.prototype */{
*
* @param {Array} models
* @param {Object} options
- * @returns {wp.media.model.Attachment[]}
+ * @return {wp.media.model.Attachment[]}
*/
add: function( models, options ) {
if ( ! this.multiple ) {
@@ -57,7 +57,7 @@ Selection = Attachments.extend(/** @lends wp.media.model.Selection.prototype */{
* @fires wp.media.model.Selection#selection:single
* @fires wp.media.model.Selection#selection:unsingle
*
- * @returns {Backbone.Model}
+ * @return {Backbone.Model}
*/
single: function( model ) {
var previous = this._single;
diff --git a/src/js/media/views/attachment-compat.js b/src/js/media/views/attachment-compat.js
index 5c2d72a58f..c58755d227 100644
--- a/src/js/media/views/attachment-compat.js
+++ b/src/js/media/views/attachment-compat.js
@@ -28,7 +28,7 @@ AttachmentCompat = View.extend(/** @lends wp.media.view.AttachmentCompat.prototy
this.listenTo( this.model, 'change:compat', this.render );
},
/**
- * @returns {wp.media.view.AttachmentCompat} Returns itself to allow chaining.
+ * @return {wp.media.view.AttachmentCompat} Returns itself to allow chaining.
*/
dispose: function() {
if ( this.$(':focus').length ) {
@@ -40,7 +40,7 @@ AttachmentCompat = View.extend(/** @lends wp.media.view.AttachmentCompat.prototy
return View.prototype.dispose.apply( this, arguments );
},
/**
- * @returns {wp.media.view.AttachmentCompat} Returns itself to allow chaining.
+ * @return {wp.media.view.AttachmentCompat} Returns itself to allow chaining.
*/
render: function() {
var compat = this.model.get('compat');
diff --git a/src/js/media/views/attachment.js b/src/js/media/views/attachment.js
index e7aae2f1a2..36ea814fe1 100644
--- a/src/js/media/views/attachment.js
+++ b/src/js/media/views/attachment.js
@@ -69,7 +69,7 @@ Attachment = View.extend(/** @lends wp.media.view.Attachment.prototype */{
this.listenTo( this.controller.states, 'attachment:compat:waiting attachment:compat:ready', this.updateSave );
},
/**
- * @returns {wp.media.view.Attachment} Returns itself to allow chaining.
+ * @return {wp.media.view.Attachment} Returns itself to allow chaining.
*/
dispose: function() {
var selection = this.options.selection;
@@ -87,7 +87,7 @@ Attachment = View.extend(/** @lends wp.media.view.Attachment.prototype */{
return this;
},
/**
- * @returns {wp.media.view.Attachment} Returns itself to allow chaining.
+ * @return {wp.media.view.Attachment} Returns itself to allow chaining.
*/
render: function() {
var options = _.defaults( this.model.toJSON(), {
@@ -282,7 +282,7 @@ Attachment = View.extend(/** @lends wp.media.view.Attachment.prototype */{
this[ this.selected() ? 'select' : 'deselect' ]();
},
/**
- * @returns {unresolved|Boolean}
+ * @return {unresolved|Boolean}
*/
selected: function() {
var selection = this.options.selection;
@@ -350,7 +350,7 @@ Attachment = View.extend(/** @lends wp.media.view.Attachment.prototype */{
},
/**
* @param {string} size
- * @returns {Object}
+ * @return {Object}
*/
imageSize: function( size ) {
var sizes = this.model.get('sizes'), matched = false;
@@ -434,7 +434,7 @@ Attachment = View.extend(/** @lends wp.media.view.Attachment.prototype */{
},
/**
* @param {string} status
- * @returns {wp.media.view.Attachment} Returns itself to allow chaining.
+ * @return {wp.media.view.Attachment} Returns itself to allow chaining.
*/
updateSave: function( status ) {
var save = this._save = this._save || { status: 'ready' };
@@ -529,7 +529,7 @@ _.each({
*
* @param {Backbone.Model} model
* @param {string} value
- * @returns {wp.media.view.Attachment} Returns itself to allow chaining.
+ * @return {wp.media.view.Attachment} Returns itself to allow chaining.
*/
/**
* @function _syncTitle
@@ -538,7 +538,7 @@ _.each({
*
* @param {Backbone.Model} model
* @param {string} value
- * @returns {wp.media.view.Attachment} Returns itself to allow chaining.
+ * @return {wp.media.view.Attachment} Returns itself to allow chaining.
*/
/**
* @function _syncArtist
@@ -547,7 +547,7 @@ _.each({
*
* @param {Backbone.Model} model
* @param {string} value
- * @returns {wp.media.view.Attachment} Returns itself to allow chaining.
+ * @return {wp.media.view.Attachment} Returns itself to allow chaining.
*/
/**
* @function _syncAlbum
@@ -556,7 +556,7 @@ _.each({
*
* @param {Backbone.Model} model
* @param {string} value
- * @returns {wp.media.view.Attachment} Returns itself to allow chaining.
+ * @return {wp.media.view.Attachment} Returns itself to allow chaining.
*/
Attachment.prototype[ method ] = function( model, value ) {
var $setting = this.$('[data-setting="' + setting + '"]');
diff --git a/src/js/media/views/attachment/details.js b/src/js/media/views/attachment/details.js
index 0afa28a4b4..5f80220088 100644
--- a/src/js/media/views/attachment/details.js
+++ b/src/js/media/views/attachment/details.js
@@ -34,7 +34,7 @@ Details = Attachment.extend(/** @lends wp.media.view.Attachment.Details.prototyp
* @constructs wp.media.view.Attachment.Details
* @augments wp.media.view.Attachment
*
- * @returns {void}
+ * @return {void}
*/
initialize: function() {
this.options = _.defaults( this.options, {
@@ -106,7 +106,7 @@ Details = Attachment.extend(/** @lends wp.media.view.Attachment.Details.prototyp
*
* @param {MouseEvent} event A click event.
*
- * @returns {void}
+ * @return {void}
*/
deleteAttachment: function( event ) {
event.preventDefault();
@@ -129,7 +129,7 @@ Details = Attachment.extend(/** @lends wp.media.view.Attachment.Details.prototyp
*
* @param {MouseEvent} event A click event.
*
- * @returns {void}
+ * @return {void}
*/
trashAttachment: function( event ) {
var library = this.controller.library,
@@ -165,7 +165,7 @@ Details = Attachment.extend(/** @lends wp.media.view.Attachment.Details.prototyp
*
* @param {MouseEvent} event A click event.
*
- * @returns {void}
+ * @return {void}
*/
untrashAttachment: function( event ) {
var library = this.controller.library;
@@ -184,7 +184,7 @@ Details = Attachment.extend(/** @lends wp.media.view.Attachment.Details.prototyp
*
* @param {MouseEvent} event A click event.
*
- * @returns {void}
+ * @return {void}
*/
editAttachment: function( event ) {
var editState = this.controller.states.get( 'edit-image' );
@@ -210,7 +210,7 @@ Details = Attachment.extend(/** @lends wp.media.view.Attachment.Details.prototyp
*
* @param {KeyboardEvent} event A keyboard event.
*
- * @returns {boolean|void} Returns false or undefined.
+ * @return {boolean|void} Returns false or undefined.
*/
toggleSelectionHandler: function( event ) {
if ( 'keydown' === event.type && 9 === event.keyCode && event.shiftKey && event.target === this.$( ':tabbable' ).get( 0 ) ) {
diff --git a/src/js/media/views/attachments.js b/src/js/media/views/attachments.js
index a3abca59a0..c36f7f681b 100644
--- a/src/js/media/views/attachments.js
+++ b/src/js/media/views/attachments.js
@@ -116,7 +116,7 @@ Attachments = View.extend(/** @lends wp.media.view.Attachments.prototype */{
*
* @listens window:resize
*
- * @returns {void}
+ * @return {void}
*/
bindEvents: function() {
this.$window.off( this.resizeEvent ).on( this.resizeEvent, _.debounce( this.setColumns, 50 ) );
@@ -127,7 +127,7 @@ Attachments = View.extend(/** @lends wp.media.view.Attachments.prototype */{
*
* @since 4.0.0
*
- * @returns {void}
+ * @return {void}
*/
attachmentFocus: function() {
/*
@@ -154,7 +154,7 @@ Attachments = View.extend(/** @lends wp.media.view.Attachments.prototype */{
*
* @since 4.0.0
*
- * @returns {void}
+ * @return {void}
*/
restoreFocus: function() {
this.$( 'li.selected:first' ).focus();
@@ -169,7 +169,7 @@ Attachments = View.extend(/** @lends wp.media.view.Attachments.prototype */{
*
* @param {KeyboardEvent} event The keyboard event that triggered this function.
*
- * @returns {void}
+ * @return {void}
*/
arrowEvent: function( event ) {
var attachments = this.$el.children( 'li' ),
@@ -219,7 +219,7 @@ Attachments = View.extend(/** @lends wp.media.view.Attachments.prototype */{
*
* @since 3.5.0
*
- * @returns {void}
+ * @return {void}
*/
dispose: function() {
this.collection.props.off( null, null, this );
@@ -239,7 +239,7 @@ Attachments = View.extend(/** @lends wp.media.view.Attachments.prototype */{
*
* @since 4.0.0
*
- * @returns {void}
+ * @return {void}
*/
setColumns: function() {
var prev = this.columns,
@@ -264,7 +264,7 @@ Attachments = View.extend(/** @lends wp.media.view.Attachments.prototype */{
*
* @fires collection:reset
*
- * @returns {void}
+ * @return {void}
*/
initSortable: function() {
var collection = this.collection;
@@ -338,7 +338,7 @@ Attachments = View.extend(/** @lends wp.media.view.Attachments.prototype */{
*
* @since 3.5.0
*
- * @returns {void}
+ * @return {void}
*/
refreshSortable: function() {
if ( ! this.options.sortable || ! $.fn.sortable ) {
@@ -359,7 +359,7 @@ Attachments = View.extend(/** @lends wp.media.view.Attachments.prototype */{
*
* @param {wp.media.model.Attachment} attachment
*
- * @returns {wp.media.View} The created view.
+ * @return {wp.media.View} The created view.
*/
createAttachmentView: function( attachment ) {
var view = new this.options.AttachmentView({
@@ -380,7 +380,7 @@ Attachments = View.extend(/** @lends wp.media.view.Attachments.prototype */{
*
* @since 3.5.0
*
- * @returns {void}
+ * @return {void}
*/
prepare: function() {
if ( this.collection.length ) {
@@ -397,7 +397,7 @@ Attachments = View.extend(/** @lends wp.media.view.Attachments.prototype */{
*
* @since 3.5.0
*
- * @returns {void}
+ * @return {void}
*/
ready: function() {
this.scroll();
@@ -411,7 +411,7 @@ Attachments = View.extend(/** @lends wp.media.view.Attachments.prototype */{
*
* @since 3.5.0
*
- * @returns {void}
+ * @return {void}
*/
scroll: function() {
var view = this,
diff --git a/src/js/media/views/attachments/browser.js b/src/js/media/views/attachments/browser.js
index 85ecfde14a..a4a880f842 100644
--- a/src/js/media/views/attachments/browser.js
+++ b/src/js/media/views/attachments/browser.js
@@ -95,7 +95,7 @@ AttachmentsBrowser = View.extend(/** @lends wp.media.view.AttachmentsBrowser.pro
*
* @since 5.3.0
*
- * @returns {void}
+ * @return {void}
*/
announceSearchResults: _.debounce( function() {
var count;
@@ -123,7 +123,7 @@ AttachmentsBrowser = View.extend(/** @lends wp.media.view.AttachmentsBrowser.pro
},
/**
- * @returns {wp.media.view.AttachmentsBrowser} Returns itself to allow chaining.
+ * @return {wp.media.view.AttachmentsBrowser} Returns itself to allow chaining.
*/
dispose: function() {
this.options.selection.off( null, null, this );
diff --git a/src/js/media/views/button-group.js b/src/js/media/views/button-group.js
index 5b44d5ff11..bf5fe968bc 100644
--- a/src/js/media/views/button-group.js
+++ b/src/js/media/views/button-group.js
@@ -35,7 +35,7 @@ ButtonGroup = wp.media.View.extend(/** @lends wp.media.view.ButtonGroup.prototyp
},
/**
- * @returns {wp.media.view.ButtonGroup}
+ * @return {wp.media.view.ButtonGroup}
*/
render: function() {
this.$el.html( $( _.pluck( this.buttons, 'el' ) ).detach() );
diff --git a/src/js/media/views/button.js b/src/js/media/views/button.js
index bde40f6463..ae7ff7852f 100644
--- a/src/js/media/views/button.js
+++ b/src/js/media/views/button.js
@@ -47,7 +47,7 @@ var Button = wp.media.View.extend(/** @lends wp.media.view.Button.prototype */{
this.listenTo( this.model, 'change', this.render );
},
/**
- * @returns {wp.media.view.Button} Returns itself to allow chaining.
+ * @return {wp.media.view.Button} Returns itself to allow chaining.
*/
render: function() {
var classes = [ 'button', this.className ],
diff --git a/src/js/media/views/embed/url.js b/src/js/media/views/embed/url.js
index 1c80ee5b4f..21ac1a9203 100644
--- a/src/js/media/views/embed/url.js
+++ b/src/js/media/views/embed/url.js
@@ -39,7 +39,7 @@ EmbedUrl = View.extend(/** @lends wp.media.view.EmbedUrl.prototype */{
}
},
/**
- * @returns {wp.media.view.EmbedUrl} Returns itself to allow chaining.
+ * @return {wp.media.view.EmbedUrl} Returns itself to allow chaining.
*/
render: function() {
var $input = this.$input;
diff --git a/src/js/media/views/focus-manager.js b/src/js/media/views/focus-manager.js
index 193864a4df..ba2db72511 100644
--- a/src/js/media/views/focus-manager.js
+++ b/src/js/media/views/focus-manager.js
@@ -37,7 +37,7 @@ var FocusManager = wp.media.View.extend(/** @lends wp.media.view.FocusManager.pr
*
* @param {object} event jQuery event object.
*
- * @returns {void}
+ * @return {void}
*/
focusManagementMode: function( event ) {
if ( this.mode === 'constrainTabbing' ) {
@@ -54,7 +54,7 @@ var FocusManager = wp.media.View.extend(/** @lends wp.media.view.FocusManager.pr
*
* @since 5.3.0
*
- * @returns {object} A jQuery collection of tabbable elements.
+ * @return {object} A jQuery collection of tabbable elements.
*/
getTabbables: function() {
// Skip the file input added by Plupload.
@@ -66,7 +66,7 @@ var FocusManager = wp.media.View.extend(/** @lends wp.media.view.FocusManager.pr
*
* @since 3.5.0
*
- * @returns {void}
+ * @return {void}
*/
focus: function() {
this.$( '.media-modal' ).focus();
@@ -79,7 +79,7 @@ var FocusManager = wp.media.View.extend(/** @lends wp.media.view.FocusManager.pr
*
* @param {Object} event A keydown jQuery event.
*
- * @returns {void}
+ * @return {void}
*/
constrainTabbing: function( event ) {
var tabbables;
@@ -116,7 +116,7 @@ var FocusManager = wp.media.View.extend(/** @lends wp.media.view.FocusManager.pr
*
* @param {object} visibleElement The jQuery object representing the element that should not be hidden.
*
- * @returns {void}
+ * @return {void}
*/
setAriaHiddenOnBodyChildren: function( visibleElement ) {
var bodyChildren,
@@ -155,7 +155,7 @@ var FocusManager = wp.media.View.extend(/** @lends wp.media.view.FocusManager.pr
*
* @since 5.2.3
*
- * @returns {void}
+ * @return {void}
*/
removeAriaHiddenFromBodyChildren: function() {
_.each( this.ariaHiddenElements, function( element ) {
@@ -173,7 +173,7 @@ var FocusManager = wp.media.View.extend(/** @lends wp.media.view.FocusManager.pr
*
* @param {object} element The DOM element that should be checked.
*
- * @returns {boolean} Whether the element should not be hidden from assistive technologies.
+ * @return {boolean} Whether the element should not be hidden from assistive technologies.
*/
elementShouldBeHidden: function( element ) {
var role = element.getAttribute( 'role' ),
@@ -220,7 +220,7 @@ var FocusManager = wp.media.View.extend(/** @lends wp.media.view.FocusManager.pr
*
* @param {object} event jQuery event object.
*
- * @returns {void}
+ * @return {void}
*/
setupAriaTabs: function() {
this.tabs = this.$( '[role="tab"]' );
@@ -244,7 +244,7 @@ var FocusManager = wp.media.View.extend(/** @lends wp.media.view.FocusManager.pr
*
* @param {object} event jQuery event object.
*
- * @returns {void}
+ * @return {void}
*/
tabsNavigation: function( event ) {
var orientation = 'horizontal',
@@ -280,7 +280,7 @@ var FocusManager = wp.media.View.extend(/** @lends wp.media.view.FocusManager.pr
*
* @param {object} event jQuery event object.
*
- * @returns {void}
+ * @return {void}
*/
switchTabs: function( event ) {
var key = event.which,
@@ -331,7 +331,7 @@ var FocusManager = wp.media.View.extend(/** @lends wp.media.view.FocusManager.pr
*
* @param {object} tab The tab DOM element.
*
- * @returns {void}
+ * @return {void}
*/
activateTab: function( tab ) {
if ( ! tab ) {
diff --git a/src/js/media/views/frame.js b/src/js/media/views/frame.js
index bd7a5c5786..ac69d6e072 100644
--- a/src/js/media/views/frame.js
+++ b/src/js/media/views/frame.js
@@ -80,7 +80,7 @@ var Frame = wp.media.View.extend(/** @lends wp.media.view.Frame.prototype */{
/**
* Reset all states on the frame to their defaults.
*
- * @returns {wp.media.view.Frame} Returns itself to allow chaining.
+ * @return {wp.media.view.Frame} Returns itself to allow chaining.
*/
reset: function() {
this.states.invoke( 'trigger', 'reset' );
@@ -114,7 +114,7 @@ var Frame = wp.media.View.extend(/** @lends wp.media.view.Frame.prototype */{
* Activate a mode on the frame.
*
* @param string mode Mode ID.
- * @returns {this} Returns itself to allow chaining.
+ * @return {this} Returns itself to allow chaining.
*/
activateMode: function( mode ) {
// Bail if the mode is already active.
@@ -131,7 +131,7 @@ var Frame = wp.media.View.extend(/** @lends wp.media.view.Frame.prototype */{
* Deactivate a mode on the frame.
*
* @param string mode Mode ID.
- * @returns {this} Returns itself to allow chaining.
+ * @return {this} Returns itself to allow chaining.
*/
deactivateMode: function( mode ) {
// Bail if the mode isn't active.
diff --git a/src/js/media/views/iframe.js b/src/js/media/views/iframe.js
index 685a13cb06..d047560d73 100644
--- a/src/js/media/views/iframe.js
+++ b/src/js/media/views/iframe.js
@@ -11,7 +11,7 @@
var Iframe = wp.media.View.extend(/** @lends wp.media.view.Iframe.prototype */{
className: 'media-iframe',
/**
- * @returns {wp.media.view.Iframe} Returns itself to allow chaining.
+ * @return {wp.media.view.Iframe} Returns itself to allow chaining.
*/
render: function() {
this.views.detach();
diff --git a/src/js/media/views/media-details.js b/src/js/media/views/media-details.js
index 093bb9cc15..19b1fb0d9c 100644
--- a/src/js/media/views/media-details.js
+++ b/src/js/media/views/media-details.js
@@ -123,7 +123,7 @@ MediaDetails = AttachmentDisplay.extend(/** @lends wp.media.view.MediaDetails.pr
},
/**
- * @returns {media.view.MediaDetails} Returns itself to allow chaining.
+ * @return {media.view.MediaDetails} Returns itself to allow chaining.
*/
render: function() {
AttachmentDisplay.prototype.render.apply( this, arguments );
@@ -148,7 +148,7 @@ MediaDetails = AttachmentDisplay.extend(/** @lends wp.media.view.MediaDetails.pr
* When multiple players in the DOM contain the same src, things get weird.
*
* @param {HTMLElement} elem
- * @returns {HTMLElement}
+ * @return {HTMLElement}
*/
prepareSrc : function( elem ) {
var i = MediaDetails.instances++;
diff --git a/src/js/media/views/media-frame.js b/src/js/media/views/media-frame.js
index 0d5e64a12e..aca0bf5ef8 100644
--- a/src/js/media/views/media-frame.js
+++ b/src/js/media/views/media-frame.js
@@ -94,7 +94,7 @@ MediaFrame = Frame.extend(/** @lends wp.media.view.MediaFrame.prototype */{
*
* @since 5.3.0
*
- * @returns {void}
+ * @return {void}
*/
setMenuTabPanelAriaAttributes: function() {
var stateId = this.state().get( 'id' ),
@@ -121,7 +121,7 @@ MediaFrame = Frame.extend(/** @lends wp.media.view.MediaFrame.prototype */{
*
* @since 5.3.0
*
- * @returns {void}
+ * @return {void}
*/
setRouterTabPanelAriaAttributes: function() {
var tabPanelEl = this.$el.find( '.media-frame-content' ),
@@ -143,7 +143,7 @@ MediaFrame = Frame.extend(/** @lends wp.media.view.MediaFrame.prototype */{
},
/**
- * @returns {wp.media.view.MediaFrame} Returns itself to allow chaining.
+ * @return {wp.media.view.MediaFrame} Returns itself to allow chaining.
*/
render: function() {
// Activate the default state if no active state exists.
@@ -316,35 +316,35 @@ _.each(['open','close','attach','detach','escape'], function( method ) {
* @memberOf wp.media.view.MediaFrame
* @instance
*
- * @returns {wp.media.view.MediaFrame} Returns itself to allow chaining.
+ * @return {wp.media.view.MediaFrame} Returns itself to allow chaining.
*/
/**
* @function close
* @memberOf wp.media.view.MediaFrame
* @instance
*
- * @returns {wp.media.view.MediaFrame} Returns itself to allow chaining.
+ * @return {wp.media.view.MediaFrame} Returns itself to allow chaining.
*/
/**
* @function attach
* @memberOf wp.media.view.MediaFrame
* @instance
*
- * @returns {wp.media.view.MediaFrame} Returns itself to allow chaining.
+ * @return {wp.media.view.MediaFrame} Returns itself to allow chaining.
*/
/**
* @function detach
* @memberOf wp.media.view.MediaFrame
* @instance
*
- * @returns {wp.media.view.MediaFrame} Returns itself to allow chaining.
+ * @return {wp.media.view.MediaFrame} Returns itself to allow chaining.
*/
/**
* @function escape
* @memberOf wp.media.view.MediaFrame
* @instance
*
- * @returns {wp.media.view.MediaFrame} Returns itself to allow chaining.
+ * @return {wp.media.view.MediaFrame} Returns itself to allow chaining.
*/
MediaFrame.prototype[ method ] = function() {
if ( this.modal ) {
diff --git a/src/js/media/views/menu-item.js b/src/js/media/views/menu-item.js
index e4b022cc74..b492b4eae3 100644
--- a/src/js/media/views/menu-item.js
+++ b/src/js/media/views/menu-item.js
@@ -47,7 +47,7 @@ MenuItem = wp.media.View.extend(/** @lends wp.media.view.MenuItem.prototype */{
},
/**
- * @returns {wp.media.view.MenuItem} returns itself to allow chaining.
+ * @return {wp.media.view.MenuItem} returns itself to allow chaining.
*/
render: function() {
var options = this.options,
diff --git a/src/js/media/views/menu.js b/src/js/media/views/menu.js
index 4ea75c7148..cf967c83bb 100644
--- a/src/js/media/views/menu.js
+++ b/src/js/media/views/menu.js
@@ -48,7 +48,7 @@ Menu = PriorityList.extend(/** @lends wp.media.view.Menu.prototype */{
/**
* @param {Object} options
* @param {string} id
- * @returns {wp.media.View}
+ * @return {wp.media.View}
*/
toView: function( options, id ) {
options = options || {};
diff --git a/src/js/media/views/modal.js b/src/js/media/views/modal.js
index b823e2f868..7927c0777b 100644
--- a/src/js/media/views/modal.js
+++ b/src/js/media/views/modal.js
@@ -37,7 +37,7 @@ Modal = wp.media.View.extend(/** @lends wp.media.view.Modal.prototype */{
});
},
/**
- * @returns {Object}
+ * @return {Object}
*/
prepare: function() {
return {
@@ -47,7 +47,7 @@ Modal = wp.media.View.extend(/** @lends wp.media.view.Modal.prototype */{
},
/**
- * @returns {wp.media.view.Modal} Returns itself to allow chaining.
+ * @return {wp.media.view.Modal} Returns itself to allow chaining.
*/
attach: function() {
if ( this.views.attached ) {
@@ -68,7 +68,7 @@ Modal = wp.media.View.extend(/** @lends wp.media.view.Modal.prototype */{
},
/**
- * @returns {wp.media.view.Modal} Returns itself to allow chaining.
+ * @return {wp.media.view.Modal} Returns itself to allow chaining.
*/
detach: function() {
if ( this.$el.is(':visible') ) {
@@ -81,7 +81,7 @@ Modal = wp.media.View.extend(/** @lends wp.media.view.Modal.prototype */{
},
/**
- * @returns {wp.media.view.Modal} Returns itself to allow chaining.
+ * @return {wp.media.view.Modal} Returns itself to allow chaining.
*/
open: function() {
var $el = this.$el,
@@ -125,7 +125,7 @@ Modal = wp.media.View.extend(/** @lends wp.media.view.Modal.prototype */{
/**
* @param {Object} options
- * @returns {wp.media.view.Modal} Returns itself to allow chaining.
+ * @return {wp.media.view.Modal} Returns itself to allow chaining.
*/
close: function( options ) {
if ( ! this.views.attached || ! this.$el.is(':visible') ) {
@@ -164,7 +164,7 @@ Modal = wp.media.View.extend(/** @lends wp.media.view.Modal.prototype */{
return this;
},
/**
- * @returns {wp.media.view.Modal} Returns itself to allow chaining.
+ * @return {wp.media.view.Modal} Returns itself to allow chaining.
*/
escape: function() {
return this.close({ escape: true });
@@ -179,7 +179,7 @@ Modal = wp.media.View.extend(/** @lends wp.media.view.Modal.prototype */{
/**
* @param {Array|Object} content Views to register to '.media-modal-content'
- * @returns {wp.media.view.Modal} Returns itself to allow chaining.
+ * @return {wp.media.view.Modal} Returns itself to allow chaining.
*/
content: function( content ) {
this.views.set( '.media-modal-content', content );
@@ -191,7 +191,7 @@ Modal = wp.media.View.extend(/** @lends wp.media.view.Modal.prototype */{
* forwards events to the modal's controller.
*
* @param {string} id
- * @returns {wp.media.view.Modal} Returns itself to allow chaining.
+ * @return {wp.media.view.Modal} Returns itself to allow chaining.
*/
propagate: function( id ) {
this.trigger( id );
diff --git a/src/js/media/views/priority-list.js b/src/js/media/views/priority-list.js
index 8a3ff50601..65e7cde20d 100644
--- a/src/js/media/views/priority-list.js
+++ b/src/js/media/views/priority-list.js
@@ -25,7 +25,7 @@ var PriorityList = wp.media.View.extend(/** @lends wp.media.view.PriorityList.pr
* @param {string} id
* @param {wp.media.View|Object} view
* @param {Object} options
- * @returns {wp.media.view.PriorityList} Returns itself to allow chaining.
+ * @return {wp.media.view.PriorityList} Returns itself to allow chaining.
*/
set: function( id, view, options ) {
var priority, views, index;
@@ -66,14 +66,14 @@ var PriorityList = wp.media.View.extend(/** @lends wp.media.view.PriorityList.pr
},
/**
* @param {string} id
- * @returns {wp.media.View}
+ * @return {wp.media.View}
*/
get: function( id ) {
return this._views[ id ];
},
/**
* @param {string} id
- * @returns {wp.media.view.PriorityList}
+ * @return {wp.media.view.PriorityList}
*/
unset: function( id ) {
var view = this.get( id );
@@ -87,7 +87,7 @@ var PriorityList = wp.media.View.extend(/** @lends wp.media.view.PriorityList.pr
},
/**
* @param {Object} options
- * @returns {wp.media.View}
+ * @return {wp.media.View}
*/
toView: function( options ) {
return new wp.media.View( options );
diff --git a/src/js/media/views/search.js b/src/js/media/views/search.js
index f774943877..875f4b7050 100644
--- a/src/js/media/views/search.js
+++ b/src/js/media/views/search.js
@@ -24,7 +24,7 @@ Search = wp.media.View.extend(/** @lends wp.media.view.Search.prototype */{
},
/**
- * @returns {wp.media.view.Search} Returns itself to allow chaining.
+ * @return {wp.media.view.Search} Returns itself to allow chaining.
*/
render: function() {
this.el.value = this.model.escape('search');
diff --git a/src/js/media/views/settings.js b/src/js/media/views/settings.js
index 6838e38114..0cfe272c0a 100644
--- a/src/js/media/views/settings.js
+++ b/src/js/media/views/settings.js
@@ -31,7 +31,7 @@ Settings = View.extend(/** @lends wp.media.view.Settings.prototype */{
}, this.options );
},
/**
- * @returns {wp.media.view.Settings} Returns itself to allow chaining.
+ * @return {wp.media.view.Settings} Returns itself to allow chaining.
*/
render: function() {
View.prototype.render.apply( this, arguments );
diff --git a/src/js/media/views/settings/attachment-display.js b/src/js/media/views/settings/attachment-display.js
index 7ca3751c08..1480e39be9 100644
--- a/src/js/media/views/settings/attachment-display.js
+++ b/src/js/media/views/settings/attachment-display.js
@@ -42,7 +42,7 @@ AttachmentDisplay = Settings.extend(/** @lends wp.media.view.Settings.Attachment
Settings.prototype.dispose.apply( this, arguments );
},
/**
- * @returns {wp.media.view.AttachmentDisplay} Returns itself to allow chaining.
+ * @return {wp.media.view.AttachmentDisplay} Returns itself to allow chaining.
*/
render: function() {
var attachment = this.options.attachment;
diff --git a/src/js/media/views/toolbar.js b/src/js/media/views/toolbar.js
index 0cece6db5e..4cd6ee2d8f 100644
--- a/src/js/media/views/toolbar.js
+++ b/src/js/media/views/toolbar.js
@@ -50,7 +50,7 @@ Toolbar = View.extend(/** @lends wp.media.view.Toolbar.prototype */{
}
},
/**
- * @returns {wp.media.view.Toolbar} Returns itsef to allow chaining
+ * @return {wp.media.view.Toolbar} Returns itsef to allow chaining
*/
dispose: function() {
if ( this.selection ) {
@@ -74,7 +74,7 @@ Toolbar = View.extend(/** @lends wp.media.view.Toolbar.prototype */{
* @param {string} id
* @param {Backbone.View|Object} view
* @param {Object} [options={}]
- * @returns {wp.media.view.Toolbar} Returns itself to allow chaining.
+ * @return {wp.media.view.Toolbar} Returns itself to allow chaining.
*/
set: function( id, view, options ) {
var list;
@@ -108,7 +108,7 @@ Toolbar = View.extend(/** @lends wp.media.view.Toolbar.prototype */{
},
/**
* @param {string} id
- * @returns {wp.media.view.Button}
+ * @return {wp.media.view.Button}
*/
get: function( id ) {
return this._views[ id ];
@@ -116,7 +116,7 @@ Toolbar = View.extend(/** @lends wp.media.view.Toolbar.prototype */{
/**
* @param {string} id
* @param {Object} options
- * @returns {wp.media.view.Toolbar} Returns itself to allow chaining.
+ * @return {wp.media.view.Toolbar} Returns itself to allow chaining.
*/
unset: function( id, options ) {
delete this._views[ id ];
diff --git a/src/js/media/views/uploader/editor.js b/src/js/media/views/uploader/editor.js
index ddc0d3d5b4..f1b842fafb 100644
--- a/src/js/media/views/uploader/editor.js
+++ b/src/js/media/views/uploader/editor.js
@@ -64,7 +64,7 @@ EditorUploader = View.extend(/** @lends wp.media.view.EditorUploader.prototype *
/**
* Check browser support for drag'n'drop.
*
- * @return Boolean
+ * @return {Boolean}
*/
browserSupport: function() {
var supports = false, div = document.createElement('div');
diff --git a/src/js/media/views/uploader/inline.js b/src/js/media/views/uploader/inline.js
index 2f94210a9b..4cb80e1e0e 100644
--- a/src/js/media/views/uploader/inline.js
+++ b/src/js/media/views/uploader/inline.js
@@ -60,7 +60,7 @@ UploaderInline = View.extend(/** @lends wp.media.view.UploaderInline.prototype *
return data;
},
/**
- * @returns {wp.media.view.UploaderInline} Returns itself to allow chaining.
+ * @return {wp.media.view.UploaderInline} Returns itself to allow chaining.
*/
dispose: function() {
if ( this.disposing ) {
@@ -77,7 +77,7 @@ UploaderInline = View.extend(/** @lends wp.media.view.UploaderInline.prototype *
return this.remove();
},
/**
- * @returns {wp.media.view.UploaderInline} Returns itself to allow chaining.
+ * @return {wp.media.view.UploaderInline} Returns itself to allow chaining.
*/
remove: function() {
/**
@@ -97,7 +97,7 @@ UploaderInline = View.extend(/** @lends wp.media.view.UploaderInline.prototype *
}
},
/**
- * @returns {wp.media.view.UploaderInline}
+ * @return {wp.media.view.UploaderInline}
*/
ready: function() {
var $browser = this.options.$browser,
diff --git a/src/js/media/views/uploader/status.js b/src/js/media/views/uploader/status.js
index 1cbdaf30a7..0be6f15f5d 100644
--- a/src/js/media/views/uploader/status.js
+++ b/src/js/media/views/uploader/status.js
@@ -33,7 +33,7 @@ UploaderStatus = View.extend(/** @lends wp.media.view.UploaderStatus.prototype *
this.errors.on( 'add', this.error, this );
},
/**
- * @returns {wp.media.view.UploaderStatus}
+ * @return {wp.media.view.UploaderStatus}
*/
dispose: function() {
wp.Uploader.queue.off( null, null, this );
@@ -102,7 +102,7 @@ UploaderStatus = View.extend(/** @lends wp.media.view.UploaderStatus.prototype *
},
/**
* @param {string} filename
- * @returns {string}
+ * @return {string}
*/
filename: function( filename ) {
return _.escape( filename );
diff --git a/src/js/media/views/view.js b/src/js/media/views/view.js
index 9b1f938fca..19b16e5c8f 100644
--- a/src/js/media/views/view.js
+++ b/src/js/media/views/view.js
@@ -28,7 +28,7 @@ var View = wp.Backbone.View.extend(/** @lends wp.media.View.prototype */{
* before Backbone 0.9.8 came out. Figure out if Backbone core takes
* care of this in Backbone.View now.
*
- * @returns {wp.media.View} Returns itself to allow chaining.
+ * @return {wp.media.View} Returns itself to allow chaining.
*/
dispose: function() {
// Undelegating events, removing events from the model, and
@@ -52,7 +52,7 @@ var View = wp.Backbone.View.extend(/** @lends wp.media.View.prototype */{
return this;
},
/**
- * @returns {wp.media.View} Returns itself to allow chaining.
+ * @return {wp.media.View} Returns itself to allow chaining.
*/
remove: function() {
this.dispose();