From bde558be2f52d2cc2abfcae9020af03adff34c65 Mon Sep 17 00:00:00 2001 From: atimmer Date: Thu, 28 Jun 2018 02:30:15 +0000 Subject: [PATCH] Docs: Add file doc `@output` annotations. These annotations make it clear to the reader of a JavaScript source where the build process outputs to. These annotations can later be integrated in a webpack configuration. This way there is one source of truth. The `build` folder is omitted from the paths, because a single JS file shouldn't not be responsible of knowing where outputs in general will end up at. A file only knows its output location relative to the project. Props adamsilverstein, herregroen, omarreiss, pento. Fixes #44361. Built from https://develop.svn.wordpress.org/trunk@43347 git-svn-id: http://core.svn.wordpress.org/trunk@43175 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/js/accordion.js | 1 + wp-admin/js/code-editor.js | 4 ++++ wp-admin/js/color-picker.js | 4 ++++ wp-admin/js/comment.js | 4 ++++ wp-admin/js/common.js | 4 ++++ wp-admin/js/custom-background.js | 4 ++++ wp-admin/js/custom-header.js | 4 ++++ wp-admin/js/customize-controls.js | 4 ++++ wp-admin/js/customize-nav-menus.js | 4 ++++ wp-admin/js/customize-widgets.js | 4 ++++ wp-admin/js/dashboard.js | 4 ++++ wp-admin/js/edit-comments.js | 4 ++++ wp-admin/js/editor-expand.js | 4 ++++ wp-admin/js/editor.js | 4 ++++ wp-admin/js/gallery.js | 4 ++++ wp-admin/js/image-edit.js | 4 +++- wp-admin/js/inline-edit-post.js | 4 +++- wp-admin/js/inline-edit-tax.js | 5 ++++- wp-admin/js/language-chooser.js | 4 ++++ wp-admin/js/link.js | 4 ++++ wp-admin/js/media-gallery.js | 8 +++++--- wp-admin/js/media-upload.js | 5 +++-- wp-admin/js/media.js | 6 ++++-- wp-admin/js/nav-menu.js | 1 + wp-admin/js/password-strength-meter.js | 4 ++++ wp-admin/js/plugin-install.js | 6 ++++-- wp-admin/js/post.js | 8 +++++--- wp-admin/js/postbox.js | 1 + wp-admin/js/revisions.js | 4 +++- wp-admin/js/set-post-thumbnail.js | 4 ++++ wp-admin/js/svg-painter.js | 1 + wp-admin/js/tags-box.js | 4 ++++ wp-admin/js/tags-suggest.js | 2 ++ wp-admin/js/tags.js | 5 ++++- wp-admin/js/theme-plugin-editor.js | 4 ++++ wp-admin/js/theme.js | 4 ++++ wp-admin/js/updates.js | 15 ++++++++------- wp-admin/js/user-profile.js | 4 ++++ wp-admin/js/user-suggest.js | 4 +++- wp-admin/js/widgets.js | 6 +++++- wp-admin/js/widgets/custom-html-widgets.js | 4 ++++ wp-admin/js/widgets/media-audio-widget.js | 4 ++++ wp-admin/js/widgets/media-gallery-widget.js | 4 ++++ wp-admin/js/widgets/media-image-widget.js | 4 ++++ wp-admin/js/widgets/media-video-widget.js | 4 ++++ wp-admin/js/widgets/media-widgets.js | 4 ++++ wp-admin/js/widgets/text-widgets.js | 4 ++++ wp-admin/js/word-count.js | 1 + wp-admin/js/wp-fullscreen-stub.js | 5 +++-- wp-admin/js/xfn.js | 1 + wp-includes/js/admin-bar.js | 4 ++++ wp-includes/js/api-request.js | 1 + wp-includes/js/autosave.js | 4 ++++ wp-includes/js/comment-reply.js | 1 + wp-includes/js/customize-base.js | 4 ++++ wp-includes/js/customize-loader.js | 5 +++++ wp-includes/js/customize-models.js | 4 ++++ wp-includes/js/customize-preview-nav-menus.js | 4 ++++ wp-includes/js/customize-preview-widgets.js | 4 ++++ wp-includes/js/customize-preview.js | 2 ++ wp-includes/js/customize-selective-refresh.js | 4 ++++ wp-includes/js/customize-views.js | 4 ++++ wp-includes/js/heartbeat.js | 1 + wp-includes/js/mce-view.js | 4 ++++ wp-includes/js/media-audiovideo.js | 4 ++++ wp-includes/js/media-editor.js | 4 ++++ wp-includes/js/media-grid.js | 4 ++++ wp-includes/js/media-models.js | 4 ++++ wp-includes/js/media-views.js | 4 ++++ wp-includes/js/quicktags.js | 6 +++++- wp-includes/js/shortcode.js | 6 +++++- wp-includes/js/utils.js | 8 ++++++-- wp-includes/js/wp-a11y.js | 4 ++++ wp-includes/js/wp-ajax-response.js | 4 ++++ wp-includes/js/wp-api.js | 4 ++++ wp-includes/js/wp-auth-check.js | 7 ++++++- wp-includes/js/wp-backbone.js | 4 ++++ wp-includes/js/wp-custom-header.js | 4 ++++ wp-includes/js/wp-embed-template.js | 3 +++ wp-includes/js/wp-embed.js | 1 + wp-includes/js/wp-emoji-loader.js | 4 ++++ wp-includes/js/wp-emoji.js | 3 +++ wp-includes/js/wp-list-revisions.js | 4 ++++ wp-includes/js/wp-lists.js | 4 ++++ wp-includes/js/wp-pointer.js | 4 ++++ wp-includes/js/wp-sanitize.js | 4 ++++ wp-includes/js/wp-util.js | 4 ++++ wp-includes/js/wpdialog.js | 4 ++++ wp-includes/js/wplink.js | 4 ++++ wp-includes/js/zxcvbn-async.js | 5 +++++ wp-includes/version.php | 2 +- 91 files changed, 334 insertions(+), 34 deletions(-) diff --git a/wp-admin/js/accordion.js b/wp-admin/js/accordion.js index 600fefbcfb..0bec1ce514 100644 --- a/wp-admin/js/accordion.js +++ b/wp-admin/js/accordion.js @@ -26,6 +26,7 @@ * Note that any appropriate tags may be used, as long as the above classes are present. * * @since 3.6.0 + * @output wp-admin/js/accordion.js */ ( function( $ ){ diff --git a/wp-admin/js/code-editor.js b/wp-admin/js/code-editor.js index 3710c37230..ea04cea2bc 100644 --- a/wp-admin/js/code-editor.js +++ b/wp-admin/js/code-editor.js @@ -1,3 +1,7 @@ +/** + * @output wp-admin/js/code-editor.js + */ + if ( 'undefined' === typeof window.wp ) { /** * @namespace wp diff --git a/wp-admin/js/color-picker.js b/wp-admin/js/color-picker.js index a3bca29df8..89e6db04a3 100644 --- a/wp-admin/js/color-picker.js +++ b/wp-admin/js/color-picker.js @@ -1,3 +1,7 @@ +/** + * @output wp-admin/js/color-picker.js + */ + /* global wpColorPickerL10n */ ( function( $, undef ) { diff --git a/wp-admin/js/comment.js b/wp-admin/js/comment.js index 6308d8e834..04d6e539f2 100644 --- a/wp-admin/js/comment.js +++ b/wp-admin/js/comment.js @@ -1,3 +1,7 @@ +/** + * @output wp-admin/js/comment.js + */ + /* global postboxes, commentL10n */ /** diff --git a/wp-admin/js/common.js b/wp-admin/js/common.js index 394648befd..26abce8c95 100644 --- a/wp-admin/js/common.js +++ b/wp-admin/js/common.js @@ -1,3 +1,7 @@ +/** + * @output wp-admin/js/common.js + */ + /* global setUserSetting, ajaxurl, commonL10n, alert, confirm, pagenow */ var showNotice, adminMenu, columns, validateForm, screenMeta; diff --git a/wp-admin/js/custom-background.js b/wp-admin/js/custom-background.js index 472ff321a9..a948e780a4 100644 --- a/wp-admin/js/custom-background.js +++ b/wp-admin/js/custom-background.js @@ -1,3 +1,7 @@ +/** + * @output wp-admin/js/custom-background.js + */ + /* global ajaxurl */ /** diff --git a/wp-admin/js/custom-header.js b/wp-admin/js/custom-header.js index 01a3d36e55..e00c70cd24 100644 --- a/wp-admin/js/custom-header.js +++ b/wp-admin/js/custom-header.js @@ -1,3 +1,7 @@ +/** + * @output wp-admin/js/custom-header.js + */ + /* global isRtl */ /** diff --git a/wp-admin/js/customize-controls.js b/wp-admin/js/customize-controls.js index ed75ba3df1..bfd21c627b 100644 --- a/wp-admin/js/customize-controls.js +++ b/wp-admin/js/customize-controls.js @@ -1,3 +1,7 @@ +/** + * @output wp-admin/js/customize-controls.js + */ + /* global _wpCustomizeHeader, _wpCustomizeBackground, _wpMediaViewsL10n, MediaElementPlayer, console, confirm */ (function( exports, $ ){ var Container, focus, normalizedTransitionendEventName, api = wp.customize; diff --git a/wp-admin/js/customize-nav-menus.js b/wp-admin/js/customize-nav-menus.js index db846baaf2..f51f6296d2 100644 --- a/wp-admin/js/customize-nav-menus.js +++ b/wp-admin/js/customize-nav-menus.js @@ -1,3 +1,7 @@ +/** + * @output wp-admin/js/customize-nav-menus.js + */ + /* global _wpCustomizeNavMenusSettings, wpNavMenu, console */ ( function( api, wp, $ ) { 'use strict'; diff --git a/wp-admin/js/customize-widgets.js b/wp-admin/js/customize-widgets.js index 40b514876b..9e4b957a25 100644 --- a/wp-admin/js/customize-widgets.js +++ b/wp-admin/js/customize-widgets.js @@ -1,3 +1,7 @@ +/** + * @output wp-admin/js/customize-widgets.js + */ + /* global _wpCustomizeWidgetsSettings */ (function( wp, $ ){ diff --git a/wp-admin/js/dashboard.js b/wp-admin/js/dashboard.js index ff0ffaa647..0719c875eb 100644 --- a/wp-admin/js/dashboard.js +++ b/wp-admin/js/dashboard.js @@ -1,3 +1,7 @@ +/** + * @output wp-admin/js/dashboard.js + */ + /* global pagenow, ajaxurl, postboxes, wpActiveEditor:true */ var ajaxWidgets, ajaxPopulateWidgets, quickPressLoad; window.wp = window.wp || {}; diff --git a/wp-admin/js/edit-comments.js b/wp-admin/js/edit-comments.js index 0b0d0846bc..c928ceb880 100644 --- a/wp-admin/js/edit-comments.js +++ b/wp-admin/js/edit-comments.js @@ -1,3 +1,7 @@ +/** + * @output wp-admin/js/edit-comments.js + */ + /* global adminCommentsL10n, thousandsSeparator, list_args, QTags, ajaxurl, wpAjax */ var setCommentsList, theList, theExtraList, commentReply; diff --git a/wp-admin/js/editor-expand.js b/wp-admin/js/editor-expand.js index 8082bc6094..30cc5e9e0c 100644 --- a/wp-admin/js/editor-expand.js +++ b/wp-admin/js/editor-expand.js @@ -1,3 +1,7 @@ +/** + * @output wp-admin/js/editor-expand.js + */ + ( function( window, $, undefined ) { 'use strict'; diff --git a/wp-admin/js/editor.js b/wp-admin/js/editor.js index 247a44478b..c3ef2238af 100644 --- a/wp-admin/js/editor.js +++ b/wp-admin/js/editor.js @@ -1,3 +1,7 @@ +/** + * @output wp-admin/js/editor.js + */ + window.wp = window.wp || {}; ( function( $, wp ) { diff --git a/wp-admin/js/gallery.js b/wp-admin/js/gallery.js index e2131323ea..c0ba0937c7 100644 --- a/wp-admin/js/gallery.js +++ b/wp-admin/js/gallery.js @@ -1,3 +1,7 @@ +/** + * @output wp-admin/js/gallery.js + */ + /* global unescape, getUserSetting, setUserSetting */ jQuery(document).ready(function($) { diff --git a/wp-admin/js/image-edit.js b/wp-admin/js/image-edit.js index 72f0405373..100f26e7e0 100644 --- a/wp-admin/js/image-edit.js +++ b/wp-admin/js/image-edit.js @@ -1,10 +1,12 @@ -/* global imageEditL10n, ajaxurl, confirm */ /** * The functions necessary for editing images. * * @since 2.9.0 + * @output wp-admin/js/image-edit.js */ + /* global imageEditL10n, ajaxurl, confirm */ + (function($) { /** diff --git a/wp-admin/js/inline-edit-post.js b/wp-admin/js/inline-edit-post.js index 665f3fe355..8bc7d37d7e 100644 --- a/wp-admin/js/inline-edit-post.js +++ b/wp-admin/js/inline-edit-post.js @@ -1,10 +1,12 @@ -/* global inlineEditL10n, ajaxurl, typenow */ /** * This file contains the functions needed for the inline editing of posts. * * @since 2.7.0 + * @output wp-admin/js/inline-edit-post.js */ +/* global inlineEditL10n, ajaxurl, typenow */ + window.wp = window.wp || {}; /** diff --git a/wp-admin/js/inline-edit-tax.js b/wp-admin/js/inline-edit-tax.js index b9a8e2f85c..d589135578 100644 --- a/wp-admin/js/inline-edit-tax.js +++ b/wp-admin/js/inline-edit-tax.js @@ -1,8 +1,11 @@ -/* global inlineEditL10n, ajaxurl */ /** * This file is used on the term overview page to power quick-editing terms. + * + * @output wp-admin/js/inline-edit-tax.js */ +/* global inlineEditL10n, ajaxurl */ + window.wp = window.wp || {}; /** diff --git a/wp-admin/js/language-chooser.js b/wp-admin/js/language-chooser.js index 9ca3ea679a..8eb33b4422 100644 --- a/wp-admin/js/language-chooser.js +++ b/wp-admin/js/language-chooser.js @@ -1,3 +1,7 @@ +/** + * @output wp-admin/js/language-chooser.js + */ + jQuery( function($) { /* * Set the correct translation to the continue button and show a spinner diff --git a/wp-admin/js/link.js b/wp-admin/js/link.js index 0eb384e43d..7df0ee74ae 100644 --- a/wp-admin/js/link.js +++ b/wp-admin/js/link.js @@ -1,3 +1,7 @@ +/** + * @output wp-admin/js/link.js + */ + /* global postboxes, deleteUserSetting, setUserSetting, getUserSetting */ jQuery(document).ready( function($) { diff --git a/wp-admin/js/media-gallery.js b/wp-admin/js/media-gallery.js index a71d8fe17f..725d2beb7c 100644 --- a/wp-admin/js/media-gallery.js +++ b/wp-admin/js/media-gallery.js @@ -1,9 +1,11 @@ -/* global ajaxurl */ - /** * This file is used on media-upload.php which has been replaced by media-new.php and upload.php - * Deprecated since 3.5.0 + * + * @deprecated 3.5.0 + * @output wp-admin/js/media-gallery.js */ + + /* global ajaxurl */ jQuery(function($) { /** * Adds a click event handler to the element with a 'wp-gallery' class. diff --git a/wp-admin/js/media-upload.js b/wp-admin/js/media-upload.js index b7171a3e9c..136b0e4b22 100644 --- a/wp-admin/js/media-upload.js +++ b/wp-admin/js/media-upload.js @@ -1,5 +1,3 @@ -/* global tinymce, QTags */ - /** * Contains global functions for the media upload within the post edit screen. * @@ -9,10 +7,13 @@ * * @file * @since 2.5.0 + * @output wp-admin/js/media-upload.js * * @requires jQuery */ +/* global tinymce, QTags */ + var wpActiveEditor, send_to_editor; /** diff --git a/wp-admin/js/media.js b/wp-admin/js/media.js index 3a87726115..68a9b75c48 100644 --- a/wp-admin/js/media.js +++ b/wp-admin/js/media.js @@ -1,15 +1,17 @@ -/* global ajaxurl, attachMediaBoxL10n, _wpMediaGridSettings, showNotice */ - /** * Creates a dialog containing posts that can have a particular media attached * to it. * * @since 2.7.0 + * @output wp-admin/js/media.js * * @namespace findPosts * * @requires jQuery */ + +/* global ajaxurl, attachMediaBoxL10n, _wpMediaGridSettings, showNotice */ + var findPosts; ( function( $ ){ diff --git a/wp-admin/js/nav-menu.js b/wp-admin/js/nav-menu.js index a121aa8b1e..bccddc8359 100644 --- a/wp-admin/js/nav-menu.js +++ b/wp-admin/js/nav-menu.js @@ -6,6 +6,7 @@ * * @package WordPress * @subpackage Administration + * @output wp-admin/js/nav-menu.js */ /* global menus, postboxes, columns, isRtl, navMenuL10n, ajaxurl */ diff --git a/wp-admin/js/password-strength-meter.js b/wp-admin/js/password-strength-meter.js index 8b903b497a..14ef40798e 100644 --- a/wp-admin/js/password-strength-meter.js +++ b/wp-admin/js/password-strength-meter.js @@ -1,3 +1,7 @@ +/** + * @output wp-admin/js/password-strength-meter.js + */ + /* global zxcvbn */ window.wp = window.wp || {}; diff --git a/wp-admin/js/plugin-install.js b/wp-admin/js/plugin-install.js index f2a0965a53..1a2cf17623 100644 --- a/wp-admin/js/plugin-install.js +++ b/wp-admin/js/plugin-install.js @@ -1,8 +1,10 @@ -/* global plugininstallL10n, tb_click, tb_remove */ - /** * @file Functionality for the plugin install screens. + * + * @output wp-admin/js/plugin-install.js */ + +/* global plugininstallL10n, tb_click, tb_remove */ var tb_position; jQuery( document ).ready( function( $ ) { diff --git a/wp-admin/js/post.js b/wp-admin/js/post.js index 74f6f391b1..18f69079a7 100644 --- a/wp-admin/js/post.js +++ b/wp-admin/js/post.js @@ -1,10 +1,12 @@ -/* global postL10n, ajaxurl, wpAjax, setPostThumbnailL10n, postboxes, pagenow, tinymce, alert, deleteUserSetting */ -/* global theList:true, theExtraList:true, getUserSetting, setUserSetting, commentReply */ - /** * @file Contains all dynamic functionality needed on post and term pages. + * + * @output wp-admin/js/post.js */ + /* global postL10n, ajaxurl, wpAjax, setPostThumbnailL10n, postboxes, pagenow, tinymce, alert, deleteUserSetting */ + /* global theList:true, theExtraList:true, getUserSetting, setUserSetting, commentReply */ + var commentsBox, WPSetThumbnailHTML, WPSetThumbnailID, WPRemoveThumbnail, wptitlehint, makeSlugeditClickable, editPermalink; // Backwards compatibility: prevent fatal errors. makeSlugeditClickable = editPermalink = function(){}; diff --git a/wp-admin/js/postbox.js b/wp-admin/js/postbox.js index a91b536eb6..265da9fd80 100644 --- a/wp-admin/js/postbox.js +++ b/wp-admin/js/postbox.js @@ -4,6 +4,7 @@ * * @since 2.5.0 * @requires jQuery + * @output wp-admin/js/postbox.js */ /* global ajaxurl, postBoxL10n */ diff --git a/wp-admin/js/revisions.js b/wp-admin/js/revisions.js index 2949c49b6d..adf586517a 100644 --- a/wp-admin/js/revisions.js +++ b/wp-admin/js/revisions.js @@ -1,10 +1,12 @@ -/* global isRtl */ /** * @file Revisions interface functions, Backbone classes and * the revisions.php document.ready bootstrap. * + * @output wp-admin/js/revisions.js */ +/* global isRtl */ + window.wp = window.wp || {}; (function($) { diff --git a/wp-admin/js/set-post-thumbnail.js b/wp-admin/js/set-post-thumbnail.js index 68abbcc830..9df25db92f 100644 --- a/wp-admin/js/set-post-thumbnail.js +++ b/wp-admin/js/set-post-thumbnail.js @@ -1,3 +1,7 @@ +/** + * @output wp-admin/js/set-post-thumbnail.js + */ + /* global setPostThumbnailL10n, ajaxurl, post_id, alert */ /* exported WPSetAsThumbnail */ diff --git a/wp-admin/js/svg-painter.js b/wp-admin/js/svg-painter.js index 7b68760a6e..e0277f13f2 100644 --- a/wp-admin/js/svg-painter.js +++ b/wp-admin/js/svg-painter.js @@ -1,6 +1,7 @@ /** * Attempt to re-color SVG icons used in the admin menu or the toolbar * + * @output wp-admin/js/svg-painter.js */ window.wp = window.wp || {}; diff --git a/wp-admin/js/tags-box.js b/wp-admin/js/tags-box.js index 0ca69e81c9..49c82fb7f9 100644 --- a/wp-admin/js/tags-box.js +++ b/wp-admin/js/tags-box.js @@ -1,3 +1,7 @@ +/** + * @output wp-admin/js/tags-box.js + */ + /* jshint curly: false, eqeqeq: false */ /* global ajaxurl */ diff --git a/wp-admin/js/tags-suggest.js b/wp-admin/js/tags-suggest.js index a24436f597..6c13c815ba 100644 --- a/wp-admin/js/tags-suggest.js +++ b/wp-admin/js/tags-suggest.js @@ -1,5 +1,7 @@ /** * Default settings for jQuery UI Autocomplete for use with non-hierarchical taxonomies. + * + * @output wp-admin/js/tags-suggest.js */ ( function( $ ) { if ( typeof window.tagsSuggestL10n === 'undefined' || typeof window.uiAutocompleteL10n === 'undefined' ) { diff --git a/wp-admin/js/tags.js b/wp-admin/js/tags.js index ed1c68bc8e..0f195c777e 100644 --- a/wp-admin/js/tags.js +++ b/wp-admin/js/tags.js @@ -1,11 +1,14 @@ -/* global ajaxurl, wpAjax, tagsl10n, showNotice, validateForm */ /** * Contains logic for deleting and adding tags. * * For deleting tags it makes a request to the server to delete the tag. * For adding tags it makes a request to the server to add the tag. + * + * @output wp-admin/js/tags.js */ + /* global ajaxurl, wpAjax, tagsl10n, showNotice, validateForm */ + jQuery(document).ready(function($) { /** diff --git a/wp-admin/js/theme-plugin-editor.js b/wp-admin/js/theme-plugin-editor.js index 3f0d45df0d..78a824f12e 100644 --- a/wp-admin/js/theme-plugin-editor.js +++ b/wp-admin/js/theme-plugin-editor.js @@ -1,3 +1,7 @@ +/** + * @output wp-admin/js/theme-plugin-editor.js + */ + /* eslint no-magic-numbers: ["error", { "ignore": [-1, 0, 1] }] */ if ( ! window.wp ) { diff --git a/wp-admin/js/theme.js b/wp-admin/js/theme.js index e797544f42..9eefeb4caa 100644 --- a/wp-admin/js/theme.js +++ b/wp-admin/js/theme.js @@ -1,3 +1,7 @@ +/** + * @output wp-admin/js/theme.js + */ + /* global _wpThemeSettings, confirm */ window.wp = window.wp || {}; diff --git a/wp-admin/js/updates.js b/wp-admin/js/updates.js index f9d161f948..0f2bb95829 100644 --- a/wp-admin/js/updates.js +++ b/wp-admin/js/updates.js @@ -2,6 +2,7 @@ * Functions for ajaxified updates, deletions and installs inside the WordPress admin. * * @version 4.2.0 + * @output wp-admin/js/updates.js */ /* global pagenow */ @@ -2322,14 +2323,14 @@ $( 'input.wp-filter-search' ).trigger( 'input' ); } ); - /** - * Trigger a search event when the "Try Again" button is clicked. - * + /** + * Trigger a search event when the "Try Again" button is clicked. + * * @since 4.9.0 - */ - $document.on( 'click', '.try-again', function( event ) { - event.preventDefault(); - $pluginInstallSearch.trigger( 'input' ); + */ + $document.on( 'click', '.try-again', function( event ) { + event.preventDefault(); + $pluginInstallSearch.trigger( 'input' ); } ); /** diff --git a/wp-admin/js/user-profile.js b/wp-admin/js/user-profile.js index e95a42844e..7fa3064400 100644 --- a/wp-admin/js/user-profile.js +++ b/wp-admin/js/user-profile.js @@ -1,3 +1,7 @@ +/** + * @output wp-admin/js/user-profile.js + */ + /* global ajaxurl, pwsL10n, userProfileL10n */ (function($) { var updateLock = false, diff --git a/wp-admin/js/user-suggest.js b/wp-admin/js/user-suggest.js index 54cb99d418..19770df075 100644 --- a/wp-admin/js/user-suggest.js +++ b/wp-admin/js/user-suggest.js @@ -1,4 +1,3 @@ -/* global ajaxurl, current_site_id, isRtl */ /** * Suggests users in a multisite environment. * @@ -8,8 +7,11 @@ * site are shown. * * @since 3.4.0 + * @output wp-admin/js/user-suggest.js */ +/* global ajaxurl, current_site_id, isRtl */ + (function( $ ) { var id = ( typeof current_site_id !== 'undefined' ) ? '&site_id=' + current_site_id : ''; $(document).ready( function() { diff --git a/wp-admin/js/widgets.js b/wp-admin/js/widgets.js index 59c2b71dfb..227890f90a 100644 --- a/wp-admin/js/widgets.js +++ b/wp-admin/js/widgets.js @@ -1,4 +1,8 @@ -/*global ajaxurl, isRtl */ +/** + * @output wp-admin/js/widgets.js + */ + +/* global ajaxurl, isRtl */ var wpWidgets; (function($) { var $document = $( document ); diff --git a/wp-admin/js/widgets/custom-html-widgets.js b/wp-admin/js/widgets/custom-html-widgets.js index 5469755870..a5bc550b07 100644 --- a/wp-admin/js/widgets/custom-html-widgets.js +++ b/wp-admin/js/widgets/custom-html-widgets.js @@ -1,3 +1,7 @@ +/** + * @output wp-admin/js/widgets/custom-html-widgets.js + */ + /* global wp */ /* eslint consistent-this: [ "error", "control" ] */ /* eslint no-magic-numbers: ["error", { "ignore": [0,1,-1] }] */ diff --git a/wp-admin/js/widgets/media-audio-widget.js b/wp-admin/js/widgets/media-audio-widget.js index e3e53c70fe..e050c30aa3 100644 --- a/wp-admin/js/widgets/media-audio-widget.js +++ b/wp-admin/js/widgets/media-audio-widget.js @@ -1,3 +1,7 @@ +/** + * @output wp-admin/js/widgets/media-audio-widget.js + */ + /* eslint consistent-this: [ "error", "control" ] */ (function( component ) { 'use strict'; diff --git a/wp-admin/js/widgets/media-gallery-widget.js b/wp-admin/js/widgets/media-gallery-widget.js index e9c5342e89..45671e7e8c 100644 --- a/wp-admin/js/widgets/media-gallery-widget.js +++ b/wp-admin/js/widgets/media-gallery-widget.js @@ -1,3 +1,7 @@ +/** + * @output wp-admin/js/widgets/media-gallery-widget.js + */ + /* eslint consistent-this: [ "error", "control" ] */ (function( component ) { 'use strict'; diff --git a/wp-admin/js/widgets/media-image-widget.js b/wp-admin/js/widgets/media-image-widget.js index eeebd174f9..3ea4f9be74 100644 --- a/wp-admin/js/widgets/media-image-widget.js +++ b/wp-admin/js/widgets/media-image-widget.js @@ -1,3 +1,7 @@ +/** + * @output wp-admin/js/widgets/media-image-widget.js + */ + /* eslint consistent-this: [ "error", "control" ] */ (function( component, $ ) { 'use strict'; diff --git a/wp-admin/js/widgets/media-video-widget.js b/wp-admin/js/widgets/media-video-widget.js index 86ed429946..b716cce437 100644 --- a/wp-admin/js/widgets/media-video-widget.js +++ b/wp-admin/js/widgets/media-video-widget.js @@ -1,3 +1,7 @@ +/** + * @output wp-admin/js/widgets/media-video-widget.js + */ + /* eslint consistent-this: [ "error", "control" ] */ (function( component ) { 'use strict'; diff --git a/wp-admin/js/widgets/media-widgets.js b/wp-admin/js/widgets/media-widgets.js index 07ea42aa37..31d093b42d 100644 --- a/wp-admin/js/widgets/media-widgets.js +++ b/wp-admin/js/widgets/media-widgets.js @@ -1,3 +1,7 @@ +/** + * @output wp-admin/js/widgets/media-widgets.js + */ + /* eslint consistent-this: [ "error", "control" ] */ /** diff --git a/wp-admin/js/widgets/text-widgets.js b/wp-admin/js/widgets/text-widgets.js index 1c928956fd..184e7242e6 100644 --- a/wp-admin/js/widgets/text-widgets.js +++ b/wp-admin/js/widgets/text-widgets.js @@ -1,3 +1,7 @@ +/** + * @output wp-admin/js/widgets/text-widgets.js + */ + /* global tinymce, switchEditors */ /* eslint consistent-this: [ "error", "control" ] */ diff --git a/wp-admin/js/word-count.js b/wp-admin/js/word-count.js index 711268aed6..999a42c50f 100644 --- a/wp-admin/js/word-count.js +++ b/wp-admin/js/word-count.js @@ -4,6 +4,7 @@ * * @namespace wp.utils * @since 2.6.0 + * @output wp-admin/js/word-count.js */ ( function() { diff --git a/wp-admin/js/wp-fullscreen-stub.js b/wp-admin/js/wp-fullscreen-stub.js index df5d2e7c96..490d18d073 100644 --- a/wp-admin/js/wp-fullscreen-stub.js +++ b/wp-admin/js/wp-fullscreen-stub.js @@ -1,8 +1,9 @@ /** * Distraction-Free Writing (wp-fullscreen) backward compatibility stub. - * Todo: remove at the end of 2016. * - * Original was deprecated in 4.1, removed in 4.3. + * @deprecated 4.1 + * @removed 4.3. + * @output wp-admin/js/wp-fullscreen-stub.js */ ( function() { var noop = function(){}; diff --git a/wp-admin/js/xfn.js b/wp-admin/js/xfn.js index 9933592e9f..61605a329b 100644 --- a/wp-admin/js/xfn.js +++ b/wp-admin/js/xfn.js @@ -2,6 +2,7 @@ * Generates the XHTML Friends Network 'rel' string from the inputs. * * @deprecated 3.5.0 + * @output wp-admin/js/xfn.js */ jQuery( document ).ready(function( $ ) { $( '#link_rel' ).prop( 'readonly', true ); diff --git a/wp-includes/js/admin-bar.js b/wp-includes/js/admin-bar.js index 9a2ae053a7..629caac645 100644 --- a/wp-includes/js/admin-bar.js +++ b/wp-includes/js/admin-bar.js @@ -1,3 +1,7 @@ +/** + * @output wp-includes/js/admin-bar.js + */ + /* jshint loopfunc: true */ // use jQuery and hoverIntent if loaded if ( typeof(jQuery) != 'undefined' ) { diff --git a/wp-includes/js/api-request.js b/wp-includes/js/api-request.js index 4b299beb69..3ed1c68695 100644 --- a/wp-includes/js/api-request.js +++ b/wp-includes/js/api-request.js @@ -9,6 +9,7 @@ * - Allows specifying only an endpoint namespace/path instead of a full URL. * * @since 4.9.0 + * @output wp-includes/js/api-request.js */ ( function( $ ) { diff --git a/wp-includes/js/autosave.js b/wp-includes/js/autosave.js index 919bc15471..c28e48a780 100644 --- a/wp-includes/js/autosave.js +++ b/wp-includes/js/autosave.js @@ -1,3 +1,7 @@ +/** + * @output wp-includes/js/autosave.js + */ + /* global tinymce, wpCookies, autosaveL10n, switchEditors */ // Back-compat window.autosave = function() { diff --git a/wp-includes/js/comment-reply.js b/wp-includes/js/comment-reply.js index 4626e627b8..fde5f51b96 100644 --- a/wp-includes/js/comment-reply.js +++ b/wp-includes/js/comment-reply.js @@ -2,6 +2,7 @@ * Handles the addition of the comment form. * * @since 2.7.0 + * @output wp-includes/js/comment-reply.js * * @namespace addComment * diff --git a/wp-includes/js/customize-base.js b/wp-includes/js/customize-base.js index 374f50300e..39aec0ad0c 100644 --- a/wp-includes/js/customize-base.js +++ b/wp-includes/js/customize-base.js @@ -1,3 +1,7 @@ +/** + * @output wp-includes/js/customize-base.js + */ + /** @namespace wp */ window.wp = window.wp || {}; diff --git a/wp-includes/js/customize-loader.js b/wp-includes/js/customize-loader.js index 9d0aad8497..e27f1bc9c5 100644 --- a/wp-includes/js/customize-loader.js +++ b/wp-includes/js/customize-loader.js @@ -1,4 +1,9 @@ +/** + * @output wp-includes/js/customize-loader.js + */ + /* global _wpCustomizeLoaderSettings */ + /** * Expose a public API that allows the customizer to be * loaded on any page. diff --git a/wp-includes/js/customize-models.js b/wp-includes/js/customize-models.js index e2a5dfbcd3..f11b3d04b8 100644 --- a/wp-includes/js/customize-models.js +++ b/wp-includes/js/customize-models.js @@ -1,3 +1,7 @@ +/** + * @output wp-includes/js/customize-models.js + */ + /* global _wpCustomizeHeader */ (function( $, wp ) { var api = wp.customize; diff --git a/wp-includes/js/customize-preview-nav-menus.js b/wp-includes/js/customize-preview-nav-menus.js index b328e67e9a..696d71afbc 100644 --- a/wp-includes/js/customize-preview-nav-menus.js +++ b/wp-includes/js/customize-preview-nav-menus.js @@ -1,3 +1,7 @@ +/** + * @output wp-includes/js/customize-preview-nav-menus.js + */ + /* global _wpCustomizePreviewNavMenusExports */ /** @namespace wp.customize.navMenusPreview */ diff --git a/wp-includes/js/customize-preview-widgets.js b/wp-includes/js/customize-preview-widgets.js index 27013d7d36..f23cc6b212 100644 --- a/wp-includes/js/customize-preview-widgets.js +++ b/wp-includes/js/customize-preview-widgets.js @@ -1,3 +1,7 @@ +/** + * @output wp-includes/js/customize-preview-widgets.js + */ + /* global _wpWidgetCustomizerPreviewSettings */ /** diff --git a/wp-includes/js/customize-preview.js b/wp-includes/js/customize-preview.js index 684837576f..4d971cc628 100644 --- a/wp-includes/js/customize-preview.js +++ b/wp-includes/js/customize-preview.js @@ -1,5 +1,7 @@ /* * Script run inside a Customizer preview frame. + * + * @output wp-includes/js/customize-preview.js */ (function( exports, $ ){ var api = wp.customize, diff --git a/wp-includes/js/customize-selective-refresh.js b/wp-includes/js/customize-selective-refresh.js index ca72b53187..82d0f9e8d6 100644 --- a/wp-includes/js/customize-selective-refresh.js +++ b/wp-includes/js/customize-selective-refresh.js @@ -1,3 +1,7 @@ +/** + * @output wp-includes/js/customize-selective-refresh.js + */ + /* global jQuery, JSON, _customizePartialRefreshExports, console */ /** @namespace wp.customize.selectiveRefresh */ diff --git a/wp-includes/js/customize-views.js b/wp-includes/js/customize-views.js index 786739f379..a7125e032e 100644 --- a/wp-includes/js/customize-views.js +++ b/wp-includes/js/customize-views.js @@ -1,3 +1,7 @@ +/** + * @output wp-includes/js/customize-views.js + */ + (function( $, wp, _ ) { if ( ! wp || ! wp.customize ) { return; } diff --git a/wp-includes/js/heartbeat.js b/wp-includes/js/heartbeat.js index 60b99344e9..03baeb6e00 100644 --- a/wp-includes/js/heartbeat.js +++ b/wp-includes/js/heartbeat.js @@ -24,6 +24,7 @@ * - heartbeat-nonces-expired * * @since 3.6.0 + * @output wp-includes/js/heartbeat.js */ ( function( $, window, undefined ) { diff --git a/wp-includes/js/mce-view.js b/wp-includes/js/mce-view.js index 8865279239..e69c748a10 100644 --- a/wp-includes/js/mce-view.js +++ b/wp-includes/js/mce-view.js @@ -1,3 +1,7 @@ +/** + * @output wp-includes/js/mce-view.js + */ + /* global tinymce */ /* diff --git a/wp-includes/js/media-audiovideo.js b/wp-includes/js/media-audiovideo.js index 5909a388a7..a9abebc8e9 100644 --- a/wp-includes/js/media-audiovideo.js +++ b/wp-includes/js/media-audiovideo.js @@ -74,6 +74,10 @@ module.exports = __webpack_require__(1); /* 1 */ /***/ (function(module, exports, __webpack_require__) { +/** + * @output wp-includes/js/media-audiovideo.js + */ + var media = wp.media, baseSettings = window._wpmejsSettings || {}, l10n = window._wpMediaViewsL10n || {}; diff --git a/wp-includes/js/media-editor.js b/wp-includes/js/media-editor.js index a88709c568..e72bd099ac 100644 --- a/wp-includes/js/media-editor.js +++ b/wp-includes/js/media-editor.js @@ -1,3 +1,7 @@ +/** + * @output wp-includes/js/media-editor.js + */ + /* global getUserSetting, tinymce, QTags */ // WordPress, TinyMCE, and Media diff --git a/wp-includes/js/media-grid.js b/wp-includes/js/media-grid.js index 4b422566ad..1d7854665d 100644 --- a/wp-includes/js/media-grid.js +++ b/wp-includes/js/media-grid.js @@ -85,6 +85,10 @@ module.exports = __webpack_require__(12); /* 12 */ /***/ (function(module, exports, __webpack_require__) { +/** + * @output wp-includes/js/media-grid.js + */ + var media = wp.media; media.controller.EditAttachmentMetadata = __webpack_require__( 13 ); diff --git a/wp-includes/js/media-models.js b/wp-includes/js/media-models.js index b1d1b7a1f1..2d6534a7c8 100644 --- a/wp-includes/js/media-models.js +++ b/wp-includes/js/media-models.js @@ -76,6 +76,10 @@ module.exports = __webpack_require__(23); /***/ 23: /***/ (function(module, exports, __webpack_require__) { +/** + * @output wp-includes/js/media-models.js + */ + var $ = jQuery, Attachment, Attachments, l10n, media; diff --git a/wp-includes/js/media-views.js b/wp-includes/js/media-views.js index cd7572ac08..598b468a54 100644 --- a/wp-includes/js/media-views.js +++ b/wp-includes/js/media-views.js @@ -74,6 +74,10 @@ module.exports = __webpack_require__(30); /* 30 */ /***/ (function(module, exports, __webpack_require__) { +/** + * @output wp-includes/js/media-views.js + */ + var media = wp.media, $ = jQuery, l10n; diff --git a/wp-includes/js/quicktags.js b/wp-includes/js/quicktags.js index e75f0de5d8..8906af1869 100644 --- a/wp-includes/js/quicktags.js +++ b/wp-includes/js/quicktags.js @@ -1,4 +1,4 @@ -/* global adminpage, wpActiveEditor, quicktagsL10n, wpLink, prompt */ + /* * Quicktags * @@ -16,12 +16,16 @@ * * quicktags_id string The ID of the textarea that will be the editor canvas * buttons string Comma separated list of the default buttons names that will be shown in that instance. + * + * @output wp-includes/js/quicktags.js */ // new edit toolbar used with permission // by Alex King // http://www.alexking.org/ +/* global adminpage, wpActiveEditor, quicktagsL10n, wpLink, prompt */ + var QTags, edCanvas, edButtons = []; diff --git a/wp-includes/js/shortcode.js b/wp-includes/js/shortcode.js index 3988132552..8f02273ba7 100644 --- a/wp-includes/js/shortcode.js +++ b/wp-includes/js/shortcode.js @@ -1,4 +1,8 @@ -// Utility functions for parsing and handling shortcodes in JavaScript. +/** + * Utility functions for parsing and handling shortcodes in JavaScript. + * + * @output wp-includes/js/shortcode.js + */ /** * Ensure the global `wp` object exists. diff --git a/wp-includes/js/utils.js b/wp-includes/js/utils.js index 48e078ed24..eda46b78cb 100644 --- a/wp-includes/js/utils.js +++ b/wp-includes/js/utils.js @@ -1,6 +1,11 @@ +/** + * Cookie functions. + * + * @output wp-includes/js/utils.js + */ + /* global userSettings */ /* exported getUserSetting, setUserSetting, deleteUserSetting */ -// utility functions var wpCookies = { // The following functions are from Cookie.js class in TinyMCE 3, Moxiecode, used under LGPL. @@ -195,4 +200,3 @@ function getAllUserSettings() { return wpCookies.getHash( 'wp-settings-' + userSettings.uid ) || {}; } - diff --git a/wp-includes/js/wp-a11y.js b/wp-includes/js/wp-a11y.js index 18d6db579f..503c62142b 100644 --- a/wp-includes/js/wp-a11y.js +++ b/wp-includes/js/wp-a11y.js @@ -1,3 +1,7 @@ +/** + * @output wp-includes/js/wp-a11y.js + */ + /** @namespace wp */ window.wp = window.wp || {}; diff --git a/wp-includes/js/wp-ajax-response.js b/wp-includes/js/wp-ajax-response.js index 363a08bf34..717c1b3014 100644 --- a/wp-includes/js/wp-ajax-response.js +++ b/wp-includes/js/wp-ajax-response.js @@ -1,3 +1,7 @@ +/** + * @output wp-includes/js/wp-ajax-response.js + */ + var wpAjax = jQuery.extend( { unserialize: function( s ) { var r = {}, q, pp, i, p; diff --git a/wp-includes/js/wp-api.js b/wp-includes/js/wp-api.js index 9ac12fe889..c62e73ff38 100644 --- a/wp-includes/js/wp-api.js +++ b/wp-includes/js/wp-api.js @@ -1,3 +1,7 @@ +/** + * @output wp-includes/js/wp-api.js + */ + (function( window, undefined ) { 'use strict'; diff --git a/wp-includes/js/wp-auth-check.js b/wp-includes/js/wp-auth-check.js index 9448a47ec7..a501d01e7f 100644 --- a/wp-includes/js/wp-auth-check.js +++ b/wp-includes/js/wp-auth-check.js @@ -1,5 +1,10 @@ +/** + * Interim login dialog. + * + * @output wp-includes/js/wp-auth-check.js + */ + /* global adminpage */ -// Interim login dialog (function($){ var wrap, next; diff --git a/wp-includes/js/wp-backbone.js b/wp-includes/js/wp-backbone.js index 0d25389fe3..12ce614569 100644 --- a/wp-includes/js/wp-backbone.js +++ b/wp-includes/js/wp-backbone.js @@ -1,3 +1,7 @@ +/** + * @output wp-includes/js/wp-backbone.js + */ + /** @namespace wp */ window.wp = window.wp || {}; diff --git a/wp-includes/js/wp-custom-header.js b/wp-includes/js/wp-custom-header.js index 9cb29d10c7..17522af766 100644 --- a/wp-includes/js/wp-custom-header.js +++ b/wp-includes/js/wp-custom-header.js @@ -1,3 +1,7 @@ +/** + * @output wp-includes/js/wp-custom-header.js + */ + /* global YT */ (function( window, settings ) { diff --git a/wp-includes/js/wp-embed-template.js b/wp-includes/js/wp-embed-template.js index 16f67080ea..65b3a1b22f 100644 --- a/wp-includes/js/wp-embed-template.js +++ b/wp-includes/js/wp-embed-template.js @@ -1,3 +1,6 @@ +/** + * @output wp-includes/js/wp-embed-template.js + */ (function ( window, document ) { 'use strict'; diff --git a/wp-includes/js/wp-embed.js b/wp-includes/js/wp-embed.js index a25e09e8ed..16e7e8bb41 100644 --- a/wp-includes/js/wp-embed.js +++ b/wp-includes/js/wp-embed.js @@ -2,6 +2,7 @@ * WordPress inline HTML embed * * @since 4.4.0 + * @output wp-includes/js/wp-embed.js * * This file cannot have ampersands in it. This is to ensure * it can be embedded in older versions of WordPress. diff --git a/wp-includes/js/wp-emoji-loader.js b/wp-includes/js/wp-emoji-loader.js index c239b87141..e0d13dc35e 100644 --- a/wp-includes/js/wp-emoji-loader.js +++ b/wp-includes/js/wp-emoji-loader.js @@ -1,3 +1,7 @@ +/** + * @output wp-includes/js/wp-emoji-loader.js + */ + ( function( window, document, settings ) { var src, ready, ii, tests; diff --git a/wp-includes/js/wp-emoji.js b/wp-includes/js/wp-emoji.js index 46cddd02be..dfb56bbecb 100644 --- a/wp-includes/js/wp-emoji.js +++ b/wp-includes/js/wp-emoji.js @@ -1,3 +1,6 @@ +/** + * @output wp-includes/js/wp-emoji.js + */ ( function( window, settings ) { function wpEmoji() { diff --git a/wp-includes/js/wp-list-revisions.js b/wp-includes/js/wp-list-revisions.js index aaa532885c..db0485ef97 100644 --- a/wp-includes/js/wp-list-revisions.js +++ b/wp-includes/js/wp-list-revisions.js @@ -1,3 +1,7 @@ +/** + * @output wp-includes/js/wp-list-revisions.js + */ + (function(w) { var init = function() { var pr = document.getElementById('post-revisions'), diff --git a/wp-includes/js/wp-lists.js b/wp-includes/js/wp-lists.js index c73471dbcb..59170bb7b4 100644 --- a/wp-includes/js/wp-lists.js +++ b/wp-includes/js/wp-lists.js @@ -1,3 +1,7 @@ +/** + * @output wp-includes/js/wp-lists.js + */ + /* global ajaxurl, wpAjax */ /** diff --git a/wp-includes/js/wp-pointer.js b/wp-includes/js/wp-pointer.js index 9f67389004..f841f82308 100644 --- a/wp-includes/js/wp-pointer.js +++ b/wp-includes/js/wp-pointer.js @@ -1,3 +1,7 @@ +/** + * @output wp-includes/js/wp-pointer.js + */ + /* global wpPointerL10n */ /** diff --git a/wp-includes/js/wp-sanitize.js b/wp-includes/js/wp-sanitize.js index 312dab2719..76b587ba74 100644 --- a/wp-includes/js/wp-sanitize.js +++ b/wp-includes/js/wp-sanitize.js @@ -1,3 +1,7 @@ +/** + * @output wp-includes/js/wp-sanitize.js + */ + ( function () { window.wp = window.wp || {}; diff --git a/wp-includes/js/wp-util.js b/wp-includes/js/wp-util.js index 6ffa97dcca..9befe512a1 100644 --- a/wp-includes/js/wp-util.js +++ b/wp-includes/js/wp-util.js @@ -1,3 +1,7 @@ +/** + * @output wp-includes/js/wp-util.js + */ + /* global _wpUtilSettings */ /** @namespace wp */ diff --git a/wp-includes/js/wpdialog.js b/wp-includes/js/wpdialog.js index baf1f2f01a..327d8768b8 100644 --- a/wp-includes/js/wpdialog.js +++ b/wp-includes/js/wpdialog.js @@ -1,3 +1,7 @@ +/** + * @output wp-includes/js/wpdialog.js + */ + /* * Wrap the jQuery UI Dialog open function remove focus from tinyMCE. */ diff --git a/wp-includes/js/wplink.js b/wp-includes/js/wplink.js index 7d50dfabcb..a89bd577e0 100644 --- a/wp-includes/js/wplink.js +++ b/wp-includes/js/wplink.js @@ -1,3 +1,7 @@ +/** + * @output wp-includes/js/wplink.js + */ + var wpLink; ( function( $, wpLinkL10n, wp ) { diff --git a/wp-includes/js/zxcvbn-async.js b/wp-includes/js/zxcvbn-async.js index 2ddbb4be83..114cb5a0d6 100644 --- a/wp-includes/js/zxcvbn-async.js +++ b/wp-includes/js/zxcvbn-async.js @@ -1,4 +1,9 @@ +/** + * @output wp-includes/js/zxcvbn-async.js + */ + /* global _zxcvbnSettings */ + /** * Loads zxcvbn asynchronously by inserting an async script tag before the first * script tag on the page. diff --git a/wp-includes/version.php b/wp-includes/version.php index 5effc7fe71..c30fab44a8 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '5.0-alpha-43346'; +$wp_version = '5.0-alpha-43347'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.