WordPress.org

Make WordPress Core

Changeset 24156


Ignore:
Timestamp:
05/02/2013 09:35:35 AM (5 years ago)
Author:
ocean90
Message:

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

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/css/wp-admin.css

    r24119 r24156  
    35323532
    35333533/* Revision meta box */
    3534 .post-revisions li img {
     3534.post-revisions li img,
     3535#revisions-meta-restored img {
    35353536    vertical-align: middle;
    35363537}
  • trunk/wp-includes/post-template.php

    r24150 r24156  
    14761476        echo $rows;
    14771477
    1478         //
    14791478        // if the post was previously restored from a revision
    14801479        // show the restore event details
    1481         //
    14821480        if ( $restored_from_meta = get_post_meta( $post->ID, '_post_restored_from', true ) ) {
    1483             $author = get_the_author_meta( 'display_name', $restored_from_meta[ 'restored_by_user' ] );
     1481            $author = get_user_by( 'id', $restored_from_meta[ 'restored_by_user' ] );
    14841482            /* translators: revision date format, see http://php.net/date */
    14851483            $datef = _x( 'j F, Y @ G:i:s', 'revision date format');
    14861484            $date = date_i18n( $datef, strtotime( $restored_from_meta[ 'restored_time' ] ) );
    1487             $timesince = human_time_diff( $restored_from_meta[ 'restored_time' ], current_time( 'timestamp' ) ) ;
     1485            $time_diff = human_time_diff( $restored_from_meta[ 'restored_time' ] ) ;
    14881486            ?>
    14891487            <hr />
    14901488            <div id="revisions-meta-restored">
    14911489                <?php
    1492                 /* translators: restored revision details: 1: revision ID, 2: time ago, 3: author name, 4: date */
    1493                 printf( _x( 'Previously restored from revision ID %1$d, %2$s ago by %3$s (%4$s)', 'restored revision details' ),
    1494                 $restored_from_meta[ 'restored_revision_id'],
    1495                 $timesince,
    1496                 $author,
    1497                 $date );
     1490                printf(
     1491                    /* translators: restored revision details: 1: gravatar image, 2: author name, 3: time ago, 4: date */
     1492                    __( 'Previously restored by %1$s %2$s, %3$s ago (%4$s)' ),
     1493                    get_avatar( $author->ID, 24 ),
     1494                    $author->display_name,
     1495                    $time_diff,
     1496                    $date
     1497                );
    14981498                ?>
    14991499            </div>
Note: See TracChangeset for help on using the changeset viewer.