<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[48385] trunk/src: I18N: Use `wp.i18n` for translatable strings in `wp-admin/js/post.js`.</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/48385">48385</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/48385","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>ocean90</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2020-07-07 16:47:14 +0000 (Tue, 07 Jul 2020)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>I18N: Use `wp.i18n` for translatable strings in `wp-admin/js/post.js`.
This removes the usage of `wp_localize_script()` for passing translations to the script and instead adds the translatable strings in the script directly through the use of `wp.i18n` and its utilities.
Props swissspidy, ocean90.
See <a href="https://core.trac.wordpress.org/ticket/20491">#20491</a>.
Fixes <a href="https://core.trac.wordpress.org/ticket/50599">#50599</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcjs_enqueuesadminpostjs">trunk/src/js/_enqueues/admin/post.js</a></li>
<li><a href="#trunksrcwpincludesscriptloaderphp">trunk/src/wp-includes/script-loader.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcjs_enqueuesadminpostjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/js/_enqueues/admin/post.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/js/_enqueues/admin/post.js 2020-07-07 16:12:14 UTC (rev 48384)
+++ trunk/src/js/_enqueues/admin/post.js 2020-07-07 16:47:14 UTC (rev 48385)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -4,7 +4,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @output wp-admin/js/post.js
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- /* global postL10n, ajaxurl, wpAjax, setPostThumbnailL10n, postboxes, pagenow, tinymce, alert, deleteUserSetting, ClipboardJS */
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ /* global ajaxurl, wpAjax, setPostThumbnailL10n, postboxes, pagenow, tinymce, alert, deleteUserSetting, ClipboardJS */
</ins><span class="cx" style="display: block; padding: 0 10px"> /* global theList:true, theExtraList:true, getUserSetting, setUserSetting, commentReply, commentsBox */
</span><span class="cx" style="display: block; padding: 0 10px"> /* global WPSetThumbnailHTML, wptitlehint */
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -15,7 +15,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> window.wp = window.wp || {};
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> ( function( $ ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- var titleHasFocus = false;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ var titleHasFocus = false,
+ __ = wp.i18n.__;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Control loading of comments on the post and term edit pages.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -73,11 +74,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( commentsBox.st > commentsBox.total )
</span><span class="cx" style="display: block; padding: 0 10px"> $('#show-comments').hide();
</span><span class="cx" style="display: block; padding: 0 10px"> else
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $('#show-comments').show().children('a').html(postL10n.showcomm);
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $('#show-comments').show().children('a').text( __( 'Show more comments' ) );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> return;
</span><span class="cx" style="display: block; padding: 0 10px"> } else if ( 1 == r ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $('#show-comments').html(postL10n.endcomm);
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $('#show-comments').text( __( 'No more comments found.' ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> return;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -295,7 +296,6 @@
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><span class="cx" style="display: block; padding: 0 10px"> jQuery(document).ready( function($) {
</span><span class="cx" style="display: block; padding: 0 10px"> var stamp, visibility, $submitButtons, updateVisibility, updateText,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- sticky = '',
</del><span class="cx" style="display: block; padding: 0 10px"> $textarea = $('#content'),
</span><span class="cx" style="display: block; padding: 0 10px"> $document = $(document),
</span><span class="cx" style="display: block; padding: 0 10px"> postId = $('#post_ID').val() || 0,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -307,7 +307,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> isMac = window.navigator.platform ? window.navigator.platform.indexOf( 'Mac' ) !== -1 : false,
</span><span class="cx" style="display: block; padding: 0 10px"> copyAttachmentURLClipboard = new ClipboardJS( '.copy-attachment-url.edit-media' ),
</span><span class="cx" style="display: block; padding: 0 10px"> copyAttachmentURLSuccessTimeout,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- __ = wp.i18n.__;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ __ = wp.i18n.__, _x = wp.i18n._x;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> postboxes.add_postbox_toggles(pagenow);
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -475,7 +475,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $submitButtons.removeClass( 'disabled' );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }).on( 'before-autosave.edit-post', function() {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $( '.autosave-message' ).text( postL10n.savingText );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $( '.autosave-message' ).text( __( 'Saving Draft…' ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> }).on( 'after-autosave.edit-post', function( event, data ) {
</span><span class="cx" style="display: block; padding: 0 10px"> $( '.autosave-message' ).text( data.message );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -494,7 +494,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ( editor && ! editor.isHidden() && editor.isDirty() ) ||
</span><span class="cx" style="display: block; padding: 0 10px"> ( wp.autosave && wp.autosave.server.postChanged() ) ) {
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- return postL10n.saveAlert;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ return __( 'The changes you made will be lost if you navigate away from this page.' );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }).on( 'unload.edit-post', function( event ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! releaseLock ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -754,14 +754,14 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Determine what the publish should be depending on the date and post status.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( attemptedDate > currentDate && $('#original_post_status').val() != 'future' ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- publishOn = postL10n.publishOnFuture;
- $('#publish').val( postL10n.schedule );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ publishOn = __( 'Schedule for:' );
+ $('#publish').val( _x( 'Schedule', 'post action/button label' ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> } else if ( attemptedDate <= currentDate && $('#original_post_status').val() != 'publish' ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- publishOn = postL10n.publishOn;
- $('#publish').val( postL10n.publish );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ publishOn = __( 'Publish on:' );
+ $('#publish').val( __( 'Publish' ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- publishOn = postL10n.publishOnPast;
- $('#publish').val( postL10n.update );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ publishOn = __( 'Published on:' );
+ $('#publish').val( __( 'Update' ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // If the date is the same, set it to trigger update events.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -771,7 +771,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> $('#timestamp').html(
</span><span class="cx" style="display: block; padding: 0 10px"> '\n' + publishOn + ' <b>' +
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- postL10n.dateFormat
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ // translators: 1: Month, 2: Day, 3: Year, 4: Hour, 5: Minute.
+ __( '%1$s %2$s, %3$s at %4$s:%5$s' )
</ins><span class="cx" style="display: block; padding: 0 10px"> .replace( '%1$s', $( 'option[value="' + mm + '"]', '#mm' ).attr( 'data-text' ) )
</span><span class="cx" style="display: block; padding: 0 10px"> .replace( '%2$s', parseInt( jj, 10 ) )
</span><span class="cx" style="display: block; padding: 0 10px"> .replace( '%3$s', aa )
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -783,11 +784,11 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Add "privately published" to post status when applies.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $postVisibilitySelect.find('input:radio:checked').val() == 'private' ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $('#publish').val( postL10n.update );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $('#publish').val( __( 'Update' ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> if ( 0 === optPublish.length ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- postStatus.append('<option value="publish">' + postL10n.privatelyPublished + '</option>');
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ postStatus.append('<option value="publish">' + __( 'Privately Published' ) + '</option>');
</ins><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- optPublish.html( postL10n.privatelyPublished );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ optPublish.html( __( 'Privately Published' ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> $('option[value="publish"]', postStatus).prop('selected', true);
</span><span class="cx" style="display: block; padding: 0 10px"> $('#misc-publishing-actions .edit-post-status').hide();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -798,7 +799,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> postStatus.val($('#hidden_post_status').val());
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- optPublish.html( postL10n.published );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ optPublish.html( __( 'Published' ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> if ( postStatus.is(':hidden') )
</span><span class="cx" style="display: block; padding: 0 10px"> $('#misc-publishing-actions .edit-post-status').show();
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -816,9 +817,9 @@
</span><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> $('#save-post').show();
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $('option:selected', postStatus).val() == 'pending' ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $('#save-post').show().val( postL10n.savePending );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $('#save-post').show().val( __( 'Save as Pending' ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $('#save-post').show().val( postL10n.saveDraft );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $('#save-post').show().val( __( 'Save Draft' ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> return true;
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -850,21 +851,29 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Set the selected visibility as current.
</span><span class="cx" style="display: block; padding: 0 10px"> $postVisibilitySelect.find('.save-post-visibility').click( function( event ) { // Crazyhorse - multiple OK cancels.
</span><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ var visibilityLabel = '', selectedVisibility = $postVisibilitySelect.find('input:radio:checked').val();
+
</ins><span class="cx" style="display: block; padding: 0 10px"> $postVisibilitySelect.slideUp('fast');
</span><span class="cx" style="display: block; padding: 0 10px"> $('#visibility .edit-visibility').show().focus();
</span><span class="cx" style="display: block; padding: 0 10px"> updateText();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $postVisibilitySelect.find('input:radio:checked').val() != 'public' ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( 'public' !== selectedVisibility ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> $('#sticky').prop('checked', false);
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( $('#sticky').prop('checked') ) {
- sticky = 'Sticky';
- } else {
- sticky = '';
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ switch ( selectedVisibility ) {
+ case 'public':
+ visibilityLabel = $( '#sticky' ).prop( 'checked' ) ? __( 'Public, Sticky' ) : __( 'Public' );
+ break;
+ case 'private':
+ visibilityLabel = __( 'Private' );
+ break;
+ case 'password':
+ visibilityLabel = __( 'Password Protected' );
+ break;
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- $('#post-visibility-display').html( postL10n[ $postVisibilitySelect.find('input:radio:checked').val() + sticky ] );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ $('#post-visibility-display').text( visibilityLabel );
</ins><span class="cx" style="display: block; padding: 0 10px"> event.preventDefault();
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -977,7 +986,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $el = $( '#editable-post-name' );
</span><span class="cx" style="display: block; padding: 0 10px"> revert_e = $el.html();
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- buttons.html( '<button type="button" class="save button button-small">' + postL10n.ok + '</button> <button type="button" class="cancel button-link">' + postL10n.cancel + '</button>' );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ buttons.html( '<button type="button" class="save button button-small">' + __( 'OK' ) + '</button> <button type="button" class="cancel button-link">' + __( 'Cancel' ) + '</button>' );
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Save permalink changes.
</span><span class="cx" style="display: block; padding: 0 10px"> buttons.children( '.save' ).click( function() {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1010,7 +1019,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> permalink.html(permalinkOrig);
</span><span class="cx" style="display: block; padding: 0 10px"> real_slug.val(new_slug);
</span><span class="cx" style="display: block; padding: 0 10px"> $( '.edit-slug' ).focus();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wp.a11y.speak( postL10n.permalinkSaved );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp.a11y.speak( __( 'Permalink saved' ) );
</ins><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px"> );
</span><span class="cx" style="display: block; padding: 0 10px"> });
</span></span></pre></div>
<a id="trunksrcwpincludesscriptloaderphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/script-loader.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/script-loader.php 2020-07-07 16:12:14 UTC (rev 48384)
+++ trunk/src/wp-includes/script-loader.php 2020-07-07 16:47:14 UTC (rev 48385)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1219,35 +1219,6 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $scripts->add( 'post', "/wp-admin/js/post$suffix.js", array( 'suggest', 'wp-lists', 'postbox', 'tags-box', 'underscore', 'word-count', 'wp-a11y', 'wp-sanitize', 'clipboard' ), false, 1 );
</span><span class="cx" style="display: block; padding: 0 10px"> $scripts->set_translations( 'post' );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- did_action( 'init' ) && $scripts->localize(
- 'post',
- 'postL10n',
- array(
- 'ok' => __( 'OK' ),
- 'cancel' => __( 'Cancel' ),
- 'publishOn' => __( 'Publish on:' ),
- 'publishOnFuture' => __( 'Schedule for:' ),
- 'publishOnPast' => __( 'Published on:' ),
- /* translators: 1: Month, 2: Day, 3: Year, 4: Hour, 5: Minute. */
- 'dateFormat' => __( '%1$s %2$s, %3$s at %4$s:%5$s' ),
- 'showcomm' => __( 'Show more comments' ),
- 'endcomm' => __( 'No more comments found.' ),
- 'publish' => __( 'Publish' ),
- 'schedule' => _x( 'Schedule', 'post action/button label' ),
- 'update' => __( 'Update' ),
- 'savePending' => __( 'Save as Pending' ),
- 'saveDraft' => __( 'Save Draft' ),
- 'private' => __( 'Private' ),
- 'public' => __( 'Public' ),
- 'publicSticky' => __( 'Public, Sticky' ),
- 'password' => __( 'Password Protected' ),
- 'privatelyPublished' => __( 'Privately Published' ),
- 'published' => __( 'Published' ),
- 'saveAlert' => __( 'The changes you made will be lost if you navigate away from this page.' ),
- 'savingText' => __( 'Saving Draft…' ),
- 'permalinkSaved' => __( 'Permalink saved' ),
- )
- );
</del><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> $scripts->add( 'editor-expand', "/wp-admin/js/editor-expand$suffix.js", array( 'jquery', 'underscore' ), false, 1 );
</span><span class="cx" style="display: block; padding: 0 10px">
</span></span></pre>
</div>
</div>
</body>
</html>