Revisions: Remove the ID from the "restored by" line. props adamsilverstein. see #18733.

git-svn-id: https://develop.svn.wordpress.org/trunk@24156 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dominik Schilling (ocean90) 2013-05-02 09:35:35 +00:00
parent 4c923807e5
commit bd5099a40a
2 changed files with 12 additions and 11 deletions

View File

@ -3531,7 +3531,8 @@ td.plugin-title p {
------------------------------------------------------------------------------*/ ------------------------------------------------------------------------------*/
/* Revision meta box */ /* Revision meta box */
.post-revisions li img { .post-revisions li img,
#revisions-meta-restored img {
vertical-align: middle; vertical-align: middle;
} }

View File

@ -1475,26 +1475,26 @@ function wp_list_post_revisions( $post_id = 0, $args = null ) {
echo "<ul class='post-revisions'>\n"; echo "<ul class='post-revisions'>\n";
echo $rows; echo $rows;
//
// if the post was previously restored from a revision // if the post was previously restored from a revision
// show the restore event details // show the restore event details
//
if ( $restored_from_meta = get_post_meta( $post->ID, '_post_restored_from', true ) ) { if ( $restored_from_meta = get_post_meta( $post->ID, '_post_restored_from', true ) ) {
$author = get_the_author_meta( 'display_name', $restored_from_meta[ 'restored_by_user' ] ); $author = get_user_by( 'id', $restored_from_meta[ 'restored_by_user' ] );
/* translators: revision date format, see http://php.net/date */ /* translators: revision date format, see http://php.net/date */
$datef = _x( 'j F, Y @ G:i:s', 'revision date format'); $datef = _x( 'j F, Y @ G:i:s', 'revision date format');
$date = date_i18n( $datef, strtotime( $restored_from_meta[ 'restored_time' ] ) ); $date = date_i18n( $datef, strtotime( $restored_from_meta[ 'restored_time' ] ) );
$timesince = human_time_diff( $restored_from_meta[ 'restored_time' ], current_time( 'timestamp' ) ) ; $time_diff = human_time_diff( $restored_from_meta[ 'restored_time' ] ) ;
?> ?>
<hr /> <hr />
<div id="revisions-meta-restored"> <div id="revisions-meta-restored">
<?php <?php
/* translators: restored revision details: 1: revision ID, 2: time ago, 3: author name, 4: date */ printf(
printf( _x( 'Previously restored from revision ID %1$d, %2$s ago by %3$s (%4$s)', 'restored revision details' ), /* translators: restored revision details: 1: gravatar image, 2: author name, 3: time ago, 4: date */
$restored_from_meta[ 'restored_revision_id'], __( 'Previously restored by %1$s %2$s, %3$s ago (%4$s)' ),
$timesince, get_avatar( $author->ID, 24 ),
$author, $author->display_name,
$date ); $time_diff,
$date
);
?> ?>
</div> </div>
<?php <?php