Ticket #44371: explicit-globals.2.patch
File explicit-globals.2.patch, 22.3 KB (added by , 6 years ago) |
---|
-
src/js/_enqueues/admin/common.js
diff --git src/js/_enqueues/admin/common.js src/js/_enqueues/admin/common.js index 26abce8..e61b824 100644
3 3 */ 4 4 5 5 /* global setUserSetting, ajaxurl, commonL10n, alert, confirm, pagenow */ 6 var showNotice, adminMenu, columns, validateForm, screenMeta;7 6 8 7 /** 9 8 * Adds common WordPress functionality to the window. … … var showNotice, adminMenu, columns, validateForm, screenMeta; 23 22 * @since 2.7.0 24 23 * @deprecated 3.3.0 25 24 */ 26 adminMenu = {25 window.adminMenu = { 27 26 init : function() {}, 28 27 fold : function() {}, 29 28 restoreMenuState : function() {}, … … adminMenu = { 32 31 }; 33 32 34 33 // Show/hide/save table columns. 35 columns = {34 window.columns = { 36 35 37 36 /** 38 37 * Initializes the column toggles in the screen options. … … $document.ready(function(){columns.init();}); 158 157 * 159 158 * @returns {boolean} Returns true if all required fields are not an empty string. 160 159 */ 161 validateForm = function( form ) {160 window.validateForm = function( form ) { 162 161 return !$( form ) 163 162 .find( '.form-required' ) 164 163 .filter( function() { return $( ':input:visible', this ).val() === ''; } ) … … validateForm = function( form ) { 178 177 * 179 178 * @returns {void} 180 179 */ 181 showNotice = {180 window.showNotice = { 182 181 183 182 /** 184 183 * Shows a delete confirmation pop-up message. … … showNotice = { 219 218 * 220 219 * @returns {void} 221 220 */ 222 screenMeta = {221 window.screenMeta = { 223 222 element: null, // #screen-meta 224 223 toggles: null, // .screen-meta-toggle 225 224 page: null, // #wpcontent -
src/js/_enqueues/admin/edit-comments.js
diff --git src/js/_enqueues/admin/edit-comments.js src/js/_enqueues/admin/edit-comments.js index c928ceb..f41f699 100644
3 3 */ 4 4 5 5 /* global adminCommentsL10n, thousandsSeparator, list_args, QTags, ajaxurl, wpAjax */ 6 var setCommentsList, theList, theExtraList, commentReply;7 6 8 7 (function($) { 9 8 var getCount, updateCount, updateCountText, updatePending, updateApproved, … … var getCount, updateCount, updateCountText, updatePending, updateApproved, 188 187 }); 189 188 }; 190 189 191 setCommentsList = function() {190 window.setCommentsList = function() { 192 191 var totalInput, perPageInput, pageInput, dimAfter, delBefore, updateTotalCount, delAfter, refillTheExtraList, diff, 193 192 lastConfidentTime = 0; 194 193 … … setCommentsList = function() { 564 563 }); 565 564 }; 566 565 567 theExtraList = $('#the-extra-comment-list').wpList( { alt: '', delColor: 'none', addColor: 'none' } );568 theList = $('#the-comment-list').wpList( { alt: '', delBefore: delBefore, dimAfter: dimAfter, delAfter: delAfter, addColor: 'none' } )566 window.theExtraList = $('#the-extra-comment-list').wpList( { alt: '', delColor: 'none', addColor: 'none' } ); 567 window.theList = $('#the-comment-list').wpList( { alt: '', delBefore: delBefore, dimAfter: dimAfter, delAfter: delAfter, addColor: 'none' } ) 569 568 .bind('wpListDelEnd', function(e, s){ 570 569 var wpListsData = $(s.target).attr('data-wp-lists'), id = s.element.replace(/[^0-9]+/g, ''); 571 570 … … setCommentsList = function() { 574 573 }); 575 574 }; 576 575 577 commentReply = {576 window.commentReply = { 578 577 cid : '', 579 578 act : '', 580 579 originalContent : '', -
src/js/_enqueues/admin/inline-edit-post.js
diff --git src/js/_enqueues/admin/inline-edit-post.js src/js/_enqueues/admin/inline-edit-post.js index 8bc7d37..2c0c2d7 100644
window.wp = window.wp || {}; 22 22 * @property {string} what The prefix before the post id. 23 23 * 24 24 */ 25 var inlineEditPost;26 25 ( function( $, wp ) { 27 26 28 inlineEditPost = {27 window.inlineEditPost = { 29 28 30 29 /** 31 30 * Initializes the inline and bulk post editor. -
src/js/_enqueues/admin/inline-edit-tax.js
diff --git src/js/_enqueues/admin/inline-edit-tax.js src/js/_enqueues/admin/inline-edit-tax.js index d589135..882ac3f 100644
window.wp = window.wp || {}; 17 17 * @property {string} what The type property with a hash prefixed and a dash 18 18 * suffixed. 19 19 */ 20 var inlineEditTax;21 22 20 ( function( $, wp ) { 23 21 24 inlineEditTax = {22 window.inlineEditTax = { 25 23 26 24 /** 27 25 * Initializes the inline taxonomy editor by adding event handlers to be able to -
src/js/_enqueues/admin/media-upload.js
diff --git src/js/_enqueues/admin/media-upload.js src/js/_enqueues/admin/media-upload.js index 136b0e4..4fd6437 100644
14 14 15 15 /* global tinymce, QTags */ 16 16 17 var wpActiveEditor, send_to_editor;18 19 17 /** 20 18 * Sends the HTML passed in the parameters to TinyMCE. 21 19 * … … var wpActiveEditor, send_to_editor; 28 26 * are unavailable. This means that the HTML was not 29 27 * sent to the editor. 30 28 */ 31 send_to_editor = function( html ) {29 window.send_to_editor = function( html ) { 32 30 var editor, 33 31 hasTinymce = typeof tinymce !== 'undefined', 34 32 hasQuicktags = typeof QTags !== 'undefined'; … … send_to_editor = function( html ) { 37 35 if ( ! wpActiveEditor ) { 38 36 if ( hasTinymce && tinymce.activeEditor ) { 39 37 editor = tinymce.activeEditor; 40 w pActiveEditor = editor.id;38 window.wpActiveEditor = editor.id; 41 39 } else if ( ! hasQuicktags ) { 42 40 return false; 43 41 } … … send_to_editor = function( html ) { 64 62 } 65 63 }; 66 64 67 var tb_position;68 65 (function($) { 69 66 /** 70 67 * Recalculates and applies the new ThickBox position based on the current … … var tb_position; 77 74 * @returns {Object[]} Array containing jQuery objects for all the found 78 75 * ThickBox anchors. 79 76 */ 80 tb_position = function() {77 window.tb_position = function() { 81 78 var tbWindow = $('#TB_window'), 82 79 width = $(window).width(), 83 80 H = $(window).height(), -
src/js/_enqueues/admin/media.js
diff --git src/js/_enqueues/admin/media.js src/js/_enqueues/admin/media.js index 68a9b75..fde4795 100644
12 12 13 13 /* global ajaxurl, attachMediaBoxL10n, _wpMediaGridSettings, showNotice */ 14 14 15 var findPosts;16 17 15 ( function( $ ){ 18 findPosts = {16 window.findPosts = { 19 17 /** 20 18 * Opens a dialog to attach media to a post. 21 19 * -
src/js/_enqueues/admin/plugin-install.js
diff --git src/js/_enqueues/admin/plugin-install.js src/js/_enqueues/admin/plugin-install.js index 1a2cf17..230dc6e 100644
5 5 */ 6 6 7 7 /* global plugininstallL10n, tb_click, tb_remove */ 8 var tb_position; 8 9 9 jQuery( document ).ready( function( $ ) { 10 10 11 11 var tbWindow, … … jQuery( document ).ready( function( $ ) { 18 18 $wrap = $ ( '.wrap' ), 19 19 $body = $( document.body ); 20 20 21 tb_position = function() {21 window.tb_position = function() { 22 22 var width = $( window ).width(), 23 23 H = $( window ).height() - ( ( 792 < width ) ? 60 : 20 ), 24 24 W = ( 792 < width ) ? 772 : width - 20; -
src/js/_enqueues/admin/post.js
diff --git src/js/_enqueues/admin/post.js src/js/_enqueues/admin/post.js index 18f6907..3f8ec2d 100644
7 7 /* global postL10n, ajaxurl, wpAjax, setPostThumbnailL10n, postboxes, pagenow, tinymce, alert, deleteUserSetting */ 8 8 /* global theList:true, theExtraList:true, getUserSetting, setUserSetting, commentReply */ 9 9 10 var commentsBox, WPSetThumbnailHTML, WPSetThumbnailID, WPRemoveThumbnail, wptitlehint, makeSlugeditClickable, editPermalink;11 10 // Backwards compatibility: prevent fatal errors. 12 makeSlugeditClickable =editPermalink = function(){};11 window.makeSlugeditClickable = window.editPermalink = function(){}; 13 12 14 13 // Make sure the wp object exists. 15 14 window.wp = window.wp || {}; … … window.wp = window.wp || {}; 24 23 * 25 24 * @namespace commentsBox 26 25 */ 27 commentsBox = {26 window.commentsBox = { 28 27 // Comment offset to use when fetching new comments. 29 28 st : 0, 30 29 … … window.wp = window.wp || {}; 108 107 * 109 108 * @global 110 109 */ 111 WPSetThumbnailHTML = function(html){110 window.WPSetThumbnailHTML = function(html){ 112 111 $('.inside', '#postimagediv').html(html); 113 112 }; 114 113 … … window.wp = window.wp || {}; 119 118 * 120 119 * @global 121 120 */ 122 WPSetThumbnailID = function(id){121 window.WPSetThumbnailID = function(id){ 123 122 var field = $('input[value="_thumbnail_id"]', '#list-table'); 124 123 if ( field.length > 0 ) { 125 124 $('#meta\\[' + field.attr('id').match(/[0-9]+/) + '\\]\\[value\\]').text(id); … … window.wp = window.wp || {}; 133 132 * 134 133 * @global 135 134 */ 136 WPRemoveThumbnail = function(nonce){135 window.WPRemoveThumbnail = function(nonce){ 137 136 $.post(ajaxurl, { 138 137 action: 'set-post-thumbnail', post_id: $( '#post_ID' ).val(), thumbnail_id: -1, _ajax_nonce: nonce, cookie: encodeURIComponent( document.cookie ) 139 138 }, … … jQuery(document).ready( function($) { 1048 1047 * 1049 1048 * @returns void 1050 1049 */ 1051 w ptitlehint = function(id) {1050 window.wptitlehint = function(id) { 1052 1051 id = id || 'title'; 1053 1052 1054 1053 var title = $('#' + id), titleprompt = $('#' + id + '-prompt-text'); -
src/js/_enqueues/admin/postbox.js
diff --git src/js/_enqueues/admin/postbox.js src/js/_enqueues/admin/postbox.js index 265da9f..914ee75 100644
9 9 10 10 /* global ajaxurl, postBoxL10n */ 11 11 12 /**13 * This object contains all function to handle the behaviour of the post boxes. The post boxes are the boxes you see14 * around the content on the edit page.15 *16 * @since 2.7.017 *18 * @namespace postboxes19 *20 * @type {Object}21 */22 var postboxes;23 24 12 (function($) { 25 13 var $document = $( document ); 26 14 27 postboxes = { 15 /** 16 * This object contains all function to handle the behaviour of the post boxes. The post boxes are the boxes you see 17 * around the content on the edit page. 18 * 19 * @since 2.7.0 20 * 21 * @namespace postboxes 22 * 23 * @type {Object} 24 */ 25 window.postboxes = { 28 26 29 27 /** 30 28 * Handles a click on either the postbox heading or the postbox open/close icon. -
src/js/_enqueues/admin/set-post-thumbnail.js
diff --git src/js/_enqueues/admin/set-post-thumbnail.js src/js/_enqueues/admin/set-post-thumbnail.js index 9df25db..dfeff94 100644
5 5 /* global setPostThumbnailL10n, ajaxurl, post_id, alert */ 6 6 /* exported WPSetAsThumbnail */ 7 7 8 function WPSetAsThumbnail( id, nonce ) {8 window.WPSetAsThumbnail = function( id, nonce ) { 9 9 var $link = jQuery('a#wp-post-thumbnail-' + id); 10 10 11 11 $link.text( setPostThumbnailL10n.saving ); -
src/js/_enqueues/admin/tags-box.js
diff --git src/js/_enqueues/admin/tags-box.js src/js/_enqueues/admin/tags-box.js index 49c82fb..8dcf359 100644
5 5 /* jshint curly: false, eqeqeq: false */ 6 6 /* global ajaxurl */ 7 7 8 var tagBox, array_unique_noempty;9 10 8 ( function( $ ) { 11 9 var tagDelimiter = ( window.tagsSuggestL10n && window.tagsSuggestL10n.tagDelimiter ) || ','; 12 10 … … var tagBox, array_unique_noempty; 24 22 * 25 23 * @return {Array} A new array containing only the unique items. 26 24 */ 27 array_unique_noempty = function( array ) {25 window.array_unique_noempty = function( array ) { 28 26 var out = []; 29 27 30 28 // Trim the values and ensure they are unique. … … var tagBox, array_unique_noempty; 49 47 * 50 48 * @global 51 49 */ 52 tagBox = {50 window.tagBox = { 53 51 /** 54 52 * Cleans up tags by removing redundant characters. 55 53 * -
src/js/_enqueues/admin/widgets.js
diff --git src/js/_enqueues/admin/widgets.js src/js/_enqueues/admin/widgets.js index 227890f..ab4c9c9 100644
3 3 */ 4 4 5 5 /* global ajaxurl, isRtl */ 6 var wpWidgets; 6 7 7 (function($) { 8 8 var $document = $( document ); 9 9 10 w pWidgets = {10 window.wpWidgets = { 11 11 /** 12 12 * A closed Sidebar that gets a Widget dragged over it. 13 13 * -
src/js/_enqueues/lib/ajax-response.js
diff --git src/js/_enqueues/lib/ajax-response.js src/js/_enqueues/lib/ajax-response.js index 717c1b3..1687d04 100644
2 2 * @output wp-includes/js/wp-ajax-response.js 3 3 */ 4 4 5 varwpAjax = jQuery.extend( {5 window.wpAjax = jQuery.extend( { 6 6 unserialize: function( s ) { 7 7 var r = {}, q, pp, i, p; 8 8 if ( !s ) { return r; } -
src/js/_enqueues/lib/comment-reply.js
diff --git src/js/_enqueues/lib/comment-reply.js src/js/_enqueues/lib/comment-reply.js index fde5f51..0c09560 100644
8 8 * 9 9 * @type {Object} 10 10 */ 11 var addComment; 12 addComment = ( function( window ) { 11 window.addComment = ( function( window ) { 13 12 // Avoid scope lookups on commonly used variables. 14 13 var document = window.document; 15 14 -
src/js/_enqueues/lib/cookies.js
diff --git src/js/_enqueues/lib/cookies.js src/js/_enqueues/lib/cookies.js index eda46b7..b67ea24 100644
7 7 /* global userSettings */ 8 8 /* exported getUserSetting, setUserSetting, deleteUserSetting */ 9 9 10 varwpCookies = {10 window.wpCookies = { 11 11 // The following functions are from Cookie.js class in TinyMCE 3, Moxiecode, used under LGPL. 12 12 13 13 each: function( obj, cb, scope ) { … … var wpCookies = { 139 139 }; 140 140 141 141 // Returns the value as string. Second arg or empty string is returned when value is not set. 142 function getUserSetting( name, def ) {142 window.getUserSetting = function( name, def ) { 143 143 var settings = getAllUserSettings(); 144 144 145 145 if ( settings.hasOwnProperty( name ) ) { … … function getUserSetting( name, def ) { 156 156 // Both name and value must be only ASCII letters, numbers or underscore 157 157 // and the shorter, the better (cookies can store maximum 4KB). Not suitable to store text. 158 158 // The value is converted and stored as string. 159 function setUserSetting( name, value, _del ) {159 window.setUserSetting = function( name, value, _del ) { 160 160 if ( 'object' !== typeof userSettings ) { 161 161 return false; 162 162 } … … function setUserSetting( name, value, _del ) { 188 188 return name; 189 189 } 190 190 191 function deleteUserSetting( name ) {191 window.deleteUserSetting = function( name ) { 192 192 return setUserSetting( name, '', 1 ); 193 193 } 194 194 195 195 // Returns all settings as js object. 196 function getAllUserSettings() {196 window.getAllUserSettings = function() { 197 197 if ( 'object' !== typeof userSettings ) { 198 198 return {}; 199 199 } -
src/js/_enqueues/lib/gallery.js
diff --git src/js/_enqueues/lib/gallery.js src/js/_enqueues/lib/gallery.js index c0ba093..a2bafbc 100644
jQuery(document).ready(function($) { 91 91 jQuery(window).unload( function () { tinymce = tinyMCE = wpgallery = null; } ); // Cleanup 92 92 93 93 /* gallery settings */ 94 var tinymce = null, tinyMCE, wpgallery;94 window.tinymce = null; 95 95 96 w pgallery = {96 window.wpgallery = { 97 97 mcemode : false, 98 98 editor : {}, 99 99 dom : {}, … … wpgallery = { 123 123 } 124 124 125 125 // Find window & API 126 tinymce = w.tinymce;127 tinyMCE = w.tinyMCE;126 window.tinymce = w.tinymce; 127 window.tinyMCE = w.tinyMCE; 128 128 t.editor = tinymce.EditorManager.activeEditor; 129 129 130 130 t.setup(); -
src/js/_enqueues/lib/link.js
diff --git src/js/_enqueues/lib/link.js src/js/_enqueues/lib/link.js index a89bd57..4b10a37 100644
2 2 * @output wp-includes/js/wplink.js 3 3 */ 4 4 5 var wpLink;6 7 5 ( function( $, wpLinkL10n, wp ) { 8 6 var editor, searchTimer, River, Query, correctedURL, linkNode, 9 7 emailRegexp = /^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,63}$/i, … … var wpLink; 16 14 return linkNode || editor.dom.getParent( editor.selection.getNode(), 'a[href]' ); 17 15 } 18 16 19 w pLink = {17 window.wpLink = { 20 18 timeToTriggerRiver: 150, 21 19 minRiverAJAXDuration: 200, 22 20 riverBottomThreshold: 5, -
src/js/_enqueues/lib/nav-menu.js
diff --git src/js/_enqueues/lib/nav-menu.js src/js/_enqueues/lib/nav-menu.js index bccddc8..b22c45a 100644
11 11 12 12 /* global menus, postboxes, columns, isRtl, navMenuL10n, ajaxurl */ 13 13 14 /**15 * Contains all the functions to handle WordPress navigation menus administration.16 *17 * @namespace18 */19 var wpNavMenu;20 21 14 (function($) { 22 15 23 16 var api; 24 17 25 api = wpNavMenu = { 18 /** 19 * Contains all the functions to handle WordPress navigation menus administration. 20 * 21 * @namespace wpNavMenu 22 */ 23 api = window.wpNavMenu = { 26 24 27 25 options : { 28 26 menuItemDepthPerLevel : 30, // Do not use directly. Use depthToPx and pxToDepth instead. -
src/js/_enqueues/lib/quicktags.js
diff --git src/js/_enqueues/lib/quicktags.js src/js/_enqueues/lib/quicktags.js index 8906af1..96c4ade 100644
26 26 27 27 /* global adminpage, wpActiveEditor, quicktagsL10n, wpLink, prompt */ 28 28 29 var QTags, edCanvas, 30 edButtons = []; 29 window.edButtons = []; 31 30 32 31 /* jshint ignore:start */ 33 32 … … var QTags, edCanvas, 36 35 * 37 36 * Define all former global functions so plugins that hack quicktags.js directly don't cause fatal errors. 38 37 */ 39 varedAddTag = function(){},40 edCheckOpenTags = function(){},41 edCloseAllTags = function(){},42 edInsertImage = function(){},43 edInsertLink = function(){},44 edInsertTag = function(){},45 edLink = function(){},46 edQuickLink = function(){},47 edRemoveTag = function(){},48 edShowButton = function(){},49 edShowLinks = function(){},50 edSpell = function(){},51 edToolbar = function(){};38 window.edAddTag = function(){}, 39 window.edCheckOpenTags = function(){}, 40 window.edCloseAllTags = function(){}, 41 window.edInsertImage = function(){}, 42 window.edInsertLink = function(){}, 43 window.edInsertTag = function(){}, 44 window.edLink = function(){}, 45 window.edQuickLink = function(){}, 46 window.edRemoveTag = function(){}, 47 window.edShowButton = function(){}, 48 window.edShowLinks = function(){}, 49 window.edSpell = function(){}, 50 window.edToolbar = function(){}; 52 51 53 52 /** 54 53 * Initialize new instance of the Quicktags editor 55 54 */ 56 function quicktags(settings) {55 window.quicktags = function(settings) { 57 56 return new QTags(settings); 58 57 } 59 58 … … function quicktags(settings) { 63 62 * Added for back compatibility 64 63 * @see QTags.insertContent() 65 64 */ 66 function edInsertContent(bah, txt) {65 window.edInsertContent = function(bah, txt) { 67 66 return QTags.insertContent(txt); 68 67 } 69 68 … … function edInsertContent(bah, txt) { 73 72 * Added for back compatibility, use QTags.addButton() as it gives more flexibility like type of button, button placement, etc. 74 73 * @see QTags.addButton() 75 74 */ 76 function edButton(id, display, tagStart, tagEnd, access) {75 window.edButton = function(id, display, tagStart, tagEnd, access) { 77 76 return QTags.addButton( id, display, tagStart, tagEnd, access, '', -1 ); 78 77 } 79 78 … … function edButton(id, display, tagStart, tagEnd, access) { 156 155 })(), 157 156 qt; 158 157 159 qt = QTags = function(settings) {158 qt = window.QTags = function(settings) { 160 159 if ( typeof(settings) === 'string' ) { 161 160 settings = {id: settings}; 162 161 } else if ( typeof(settings) !== 'object' ) { … … function edButton(id, display, tagStart, tagEnd, access) { 180 179 181 180 if ( id === 'content' && typeof(adminpage) === 'string' && ( adminpage === 'post-new-php' || adminpage === 'post-php' ) ) { 182 181 // back compat hack :-( 183 edCanvas = canvas;182 window.edCanvas = canvas; 184 183 toolbar_id = 'ed_toolbar'; 185 184 } else { 186 185 toolbar_id = name + '_toolbar'; -
src/js/_enqueues/wp/dashboard.js
diff --git src/js/_enqueues/wp/dashboard.js src/js/_enqueues/wp/dashboard.js index 0719c87..e066a20 100644
3 3 */ 4 4 5 5 /* global pagenow, ajaxurl, postboxes, wpActiveEditor:true */ 6 var ajaxWidgets, ajaxPopulateWidgets, quickPressLoad;7 6 window.wp = window.wp || {}; 8 7 9 8 /** … … jQuery(document).ready( function($) { 61 60 * 62 61 * @global 63 62 */ 64 ajaxWidgets = ['dashboard_primary'];63 window.ajaxWidgets = ['dashboard_primary']; 65 64 66 65 /** 67 66 * Triggers widget updates via AJAX. … … jQuery(document).ready( function($) { 74 73 * 75 74 * @returns {void} 76 75 */ 77 ajaxPopulateWidgets = function(el) {76 window.ajaxPopulateWidgets = function(el) { 78 77 /** 79 78 * Fetch the latest representation of the widget via Ajax and show it. 80 79 * … … jQuery(document).ready( function($) { 104 103 if ( el ) { 105 104 el = el.toString(); 106 105 // If the element is available as AJAX widget, show it. 107 if ( $.inArray(el, ajaxWidgets) !== -1 ) {106 if ( $.inArray(el, window.ajaxWidgets) !== -1 ) { 108 107 // Show element without any delay. 109 108 show(0, el); 110 109 } 111 110 } else { 112 111 // Walk through all ajaxWidgets, loading them after each other. 113 $.each( ajaxWidgets, show );112 $.each( window.ajaxWidgets, show ); 114 113 } 115 114 }; 116 115 117 116 // Initially populate ajax widgets. 118 ajaxPopulateWidgets();117 window.ajaxPopulateWidgets(); 119 118 120 119 // Register ajax widgets as postbox toggles. 121 postboxes.add_postbox_toggles(pagenow, { pbshow: ajaxPopulateWidgets } );120 postboxes.add_postbox_toggles(pagenow, { pbshow: window.ajaxPopulateWidgets } ); 122 121 123 122 /** 124 123 * Control the Quick Press (Quick Draft) widget. … … jQuery(document).ready( function($) { 129 128 * 130 129 * @returns {void} 131 130 */ 132 quickPressLoad = function() {131 window.quickPressLoad = function() { 133 132 var act = $('#quickpost-action'), t; 134 133 135 134 // Enable the submit buttons. … … jQuery(document).ready( function($) { 149 148 // Replace the form, and prepend the published post. 150 149 $('#dashboard_quick_press .inside').html( data ); 151 150 $('#quick-press').removeClass('initial-form'); 152 quickPressLoad();151 window.quickPressLoad(); 153 152 highlightLatestPost(); 154 153 155 154 // Focus the title to allow for quickly drafting another post. … … jQuery(document).ready( function($) { 210 209 211 210 autoResizeTextarea(); 212 211 }; 213 quickPressLoad();212 window.quickPressLoad(); 214 213 215 214 // Enable the dragging functionality of the widgets. 216 215 $( '.meta-box-sortables' ).sortable( 'option', 'containment', '#wpwrap' ); -
src/js/_enqueues/wp/password-strength-meter.js
diff --git src/js/_enqueues/wp/password-strength-meter.js src/js/_enqueues/wp/password-strength-meter.js index 14ef407..753f697 100644
5 5 /* global zxcvbn */ 6 6 window.wp = window.wp || {}; 7 7 8 var passwordStrength;9 8 (function($){ 10 9 11 10 /** … … var passwordStrength; 118 117 * 119 118 * @type {wp.passwordStrength.meter} 120 119 */ 121 passwordStrength = wp.passwordStrength.meter;120 window.passwordStrength = wp.passwordStrength.meter; 122 121 })(jQuery); -
src/js/_enqueues/wp/theme.js
diff --git src/js/_enqueues/wp/theme.js src/js/_enqueues/wp/theme.js index 9eefeb4..8b7d927 100644
$( document ).ready(function() { 2041 2041 })( jQuery ); 2042 2042 2043 2043 // Align theme browser thickbox 2044 var tb_position;2045 2044 jQuery(document).ready( function($) { 2046 tb_position = function() {2045 window.tb_position = function() { 2047 2046 var tbWindow = $('#TB_window'), 2048 2047 width = $(window).width(), 2049 2048 H = $(window).height(),