diff --git a/wp-admin/js/post.js b/wp-admin/js/post.js index 9a40cc7d23..c9b002a65a 100644 --- a/wp-admin/js/post.js +++ b/wp-admin/js/post.js @@ -135,21 +135,26 @@ window.wp = window.wp || {}; * @global */ window.WPRemoveThumbnail = function(nonce){ - $.post(ajaxurl, { - action: 'set-post-thumbnail', post_id: $( '#post_ID' ).val(), thumbnail_id: -1, _ajax_nonce: nonce, cookie: encodeURIComponent( document.cookie ) - }, + $.post( + ajaxurl, { + action: 'set-post-thumbnail', + post_id: $( '#post_ID' ).val(), + thumbnail_id: -1, + _ajax_nonce: nonce, + cookie: encodeURIComponent( document.cookie ) + }, /** * Handle server response * * @param {string} str Response, will be '0' when an error occurred otherwise contains link to add Featured Image. */ function(str){ - if ( str == '0' ) { - alert( __( 'Could not set that as the thumbnail image. Try a different attachment.' ) ); - } else { - WPSetThumbnailHTML(str); + if ( str == '0' ) { + alert( __( 'Could not set that as the thumbnail image. Try a different attachment.' ) ); + } else { + WPSetThumbnailHTML(str); + } } - } ); }; @@ -207,7 +212,9 @@ window.wp = window.wp || {}; height: 64, alt: '', src: received.lock_error.avatar_src, - srcset: received.lock_error.avatar_src_2x ? received.lock_error.avatar_src_2x + ' 2x' : undefined + srcset: received.lock_error.avatar_src_2x ? + received.lock_error.avatar_src_2x + ' 2x' : + undefined } ); wrap.find('div.post-locked-avatar').empty().append( avatar ); } @@ -666,11 +673,15 @@ jQuery( function($) { }); // Sync checked items between "All {taxonomy}" and "Most used" lists. - $('#' + taxonomy + 'checklist, #' + taxonomy + 'checklist-pop').on( 'click', 'li.popular-category > label input[type="checkbox"]', function() { - var t = $(this), c = t.is(':checked'), id = t.val(); - if ( id && t.parents('#taxonomy-'+taxonomy).length ) - $('#in-' + taxonomy + '-' + id + ', #in-popular-' + taxonomy + '-' + id).prop( 'checked', c ); - }); + $('#' + taxonomy + 'checklist, #' + taxonomy + 'checklist-pop').on( + 'click', + 'li.popular-category > label input[type="checkbox"]', + function() { + var t = $(this), c = t.is(':checked'), id = t.val(); + if ( id && t.parents('#taxonomy-'+taxonomy).length ) + $('#in-' + taxonomy + '-' + id + ', #in-popular-' + taxonomy + '-' + id).prop( 'checked', c ); + } + ); }); // End cats. @@ -749,11 +760,28 @@ jQuery( function($) { mm = $('#mm').val(), jj = $('#jj').val(), hh = $('#hh').val(), mn = $('#mn').val(); attemptedDate = new Date( aa, mm - 1, jj, hh, mn ); - originalDate = new Date( $('#hidden_aa').val(), $('#hidden_mm').val() -1, $('#hidden_jj').val(), $('#hidden_hh').val(), $('#hidden_mn').val() ); - currentDate = new Date( $('#cur_aa').val(), $('#cur_mm').val() -1, $('#cur_jj').val(), $('#cur_hh').val(), $('#cur_mn').val() ); + originalDate = new Date( + $('#hidden_aa').val(), + $('#hidden_mm').val() -1, + $('#hidden_jj').val(), + $('#hidden_hh').val(), + $('#hidden_mn').val() + ); + currentDate = new Date( + $('#cur_aa').val(), + $('#cur_mm').val() -1, + $('#cur_jj').val(), + $('#cur_hh').val(), + $('#cur_mn').val() + ); // Catch unexpected date problems. - if ( attemptedDate.getFullYear() != aa || (1 + attemptedDate.getMonth()) != mm || attemptedDate.getDate() != jj || attemptedDate.getMinutes() != mn ) { + if ( + attemptedDate.getFullYear() != aa || + (1 + attemptedDate.getMonth()) != mm || + attemptedDate.getDate() != jj || + attemptedDate.getMinutes() != mn + ) { $timestampdiv.find('.timestamp-wrap').addClass('form-invalid'); return false; } else { @@ -820,7 +848,10 @@ jQuery( function($) { ); // Show or hide the "Save Draft" button. - if ( $('option:selected', postStatus).val() == 'private' || $('option:selected', postStatus).val() == 'publish' ) { + if ( + $('option:selected', postStatus).val() == 'private' || + $('option:selected', postStatus).val() == 'publish' + ) { $('#save-post').hide(); } else { $('#save-post').show(); @@ -994,7 +1025,10 @@ jQuery( function($) { $el = $( '#editable-post-name' ); revert_e = $el.html(); - buttons.html( ' ' ); + buttons.html( + ' ' + + '' + ); // Save permalink changes. buttons.children( '.save' ).on( 'click', function() { @@ -1050,7 +1084,10 @@ jQuery( function($) { slug_value = ( c > full.length / 4 ) ? '' : full; slug_label = __( 'URL Slug' ); - $el.html( '' ).children( 'input' ).on( 'keydown', function( e ) { + $el.html( + '' + + '' + ).children( 'input' ).on( 'keydown', function( e ) { var key = e.which; // On [Enter], just save the new slug, don't save the post. if ( 13 === key ) { @@ -1224,7 +1261,12 @@ jQuery( function($) { $textarea.on( 'keydown.wp-autosave', function( event ) { // Key [S] has code 83. if ( event.which === 83 ) { - if ( event.shiftKey || event.altKey || ( isMac && ( ! event.metaKey || event.ctrlKey ) ) || ( ! isMac && ! event.ctrlKey ) ) { + if ( + event.shiftKey || + event.altKey || + ( isMac && ( ! event.metaKey || event.ctrlKey ) ) || + ( ! isMac && ! event.ctrlKey ) + ) { return; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 42f14bf717..af385ba585 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '5.9-alpha-52227'; +$wp_version = '5.9-alpha-52228'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.