Ticket #23917: 23917.2.patch
File 23917.2.patch, 5.3 KB (added by , 11 years ago) |
---|
-
wp-includes/post-template.php
1312 1312 /* translators: revision date format, see http://php.net/date */ 1313 1313 $datef = _x( 'j F, Y @ G:i', 'revision date format'); 1314 1314 /* translators: 1: date */ 1315 $autosavef = _ _( '%1$s [Autosave]' );1315 $autosavef = _x( '%1$s [Autosave]', 'post revision title extra' ); 1316 1316 /* translators: 1: date */ 1317 $currentf = _ _( '%1$s [Current Revision]' );1317 $currentf = _x( '%1$s [Current Revision]', 'post revision title extra' ); 1318 1318 1319 1319 $date = date_i18n( $datef, strtotime( $revision->post_modified ) ); 1320 1320 if ( $link && current_user_can( 'edit_post', $revision->ID ) && $link = get_edit_post_link( $revision->ID ) ) -
wp-admin/includes/ajax-actions.php
2245 2245 $date 2246 2246 ); 2247 2247 2248 /* translators: 1: date */ 2248 2249 $autosavef = _x( '%1$s [Autosave]', 'post revision title extra' ); 2250 /* translators: 1: date */ 2249 2251 $currentf = _x( '%1$s [Current Revision]', 'post revision title extra' ); 2250 2252 2251 2253 if ( ! $post = get_post( $post_id ) ) -
wp-admin/js/revisions.js
1 1 window.wp = window.wp || {}; 2 2 3 3 (function($) { 4 var Revision, Revisions, Diff, l10n,revisions;4 var Revision, Revisions, Diff, revisions; 5 5 6 6 revisions = wp.revisions = function() { 7 7 Diff = revisions.Diff = new Diff(); … … 9 9 10 10 _.extend( revisions, { model: {}, view: {}, controller: {} } ); 11 11 12 // Link any localized strings.13 l10n = revisions.model.l10n = typeof wpRevisionsL10n === 'undefined' ? {} : wpRevisionsL10n;12 // Link settings. 13 revisions.model.settings = typeof wpRevisionsSettings === 'undefined' ? {} : wpRevisionsSettings; 14 14 15 // Link any settings.16 revisions.model.settings = l10n.settings || {};17 delete l10n.settings;18 15 19 20 16 /** 21 17 * ======================================================================== 22 18 * CONTROLLERS … … 330 326 Diff.rightDiff = ui.values[1]; 331 327 } 332 328 333 if ( 0 === Diff.leftDiff ) {334 $( '#revision-diff-container' ).addClass( 'current-version' );335 } else {336 $( '#revision-diff-container' ).removeClass( 'current-version' );337 }338 339 329 Diff.revisionView.render(); 340 330 } 341 331 }, -
wp-admin/css/wp-admin.css
3694 3694 3695 3695 .comparing-two-revisions #diff-previous-revision, 3696 3696 .comparing-two-revisions #diff-next-revision, 3697 #diff-title-from-current-version,3698 .comparing-two-revisions.current-version #diff-title-from-current-version,3699 3697 #diff-header-from { 3700 3698 display: none; 3701 3699 } -
wp-admin/revision.php
78 78 79 79 wp_enqueue_script( 'revisions' ); 80 80 81 $strings = array(82 'diffFromTitle' => _x( 'From: %s', 'revision from title' ),83 'diffToTitle' => _x( 'To: %s', 'revision to title' )84 );85 81 86 82 $settings = array( 87 83 'post_id' => $post->ID, … … 89 85 'revision_id' => $revision_id 90 86 ); 91 87 92 $strings['settings'] = $settings; 93 wp_localize_script( 'revisions', 'wpRevisionsL10n', $strings ); 88 wp_localize_script( 'revisions', 'wpRevisionsSettings', $settings ); 94 89 95 90 require_once( './admin-header.php' ); 96 91 … … 125 120 126 121 <div id="diff-header"> 127 122 <div id="diff-header-from" class="diff-header"> 128 <div id="diff-title-from-current-version" class="diff-title">129 <?php printf( '<strong>%1$s</strong> %2$s.' , __( 'From:' ), __( 'the current version' ) ); ?>130 </div>131 132 123 <div id="diff-title-from" class="diff-title"> 133 <strong><?php _e ( 'From:' ); ?></strong> {{{ data.titleFrom }}}124 <strong><?php _ex( 'From:', 'Followed by post revision info' ); ?></strong> {{{ data.titleFrom }}} 134 125 </div> 135 126 </div> 136 127 137 128 <div id="diff-header-to" class="diff-header"> 138 129 <div id="diff-title-to" class="diff-title"> 139 <strong><?php _e( 'To:' ); ?></strong> {{{ data.titleTo }}}130 <strong><?php _e( 'To:', 'Followed by post revision info' ); ?></strong> {{{ data.titleTo }}} 140 131 </div> 141 132 142 133 <input type="button" id="restore-revision" class="button button-primary" data-restore-link="{{{ data.restoreLink }}}" value="<?php esc_attr_e( 'Restore This Revision' )?>" /> … … 150 141 151 142 <script id="tmpl-revision-interact" type="text/html"> 152 143 <div id="diff-previous-revision"> 153 <input class="button" type="button" id="previous" value="<?php e sc_attr_e( 'Previous' ); ?>" />144 <input class="button" type="button" id="previous" value="<?php echo esc_attr_x( 'Previous', 'Button label for a previous revision' ); ?>" /> 154 145 </div> 155 146 156 147 <div id="diff-next-revision"> 157 <input class="button" type="button" id="next" value="<?php e sc_attr_e( 'Next' ); ?>" />148 <input class="button" type="button" id="next" value="<?php echo esc_attr_x( 'Next', 'Button label for a next revision' ); ?>" /> 158 149 </div> 159 150 160 151 <div id="diff-slider" class="wp-slider"></div>