WordPress.org

Make WordPress Core

Ticket #17028: 17028.patch

File 17028.patch, 1.0 KB (added by rhyswynne, 5 years ago)

patch.diff produced a notice error. Fixed by using $post->ID rather than $post_ID. Probably needs some UI work.

  • wp-admin/includes/meta-boxes.php

     
    113113</div>
    114114
    115115<?php } ?>
     116<div class="autosave-message"></div>
     117<div>
     118<?php
     119        if ( 'auto-draft' != $post->post_status ) {
     120                echo '<span id="last-edit">';
     121                if ( $last_id = get_post_meta($post->ID, '_edit_last', true) ) {
     122                        $last_user = get_userdata($last_id);
     123                        printf(__('Last edited by %1$s on %2$s at %3$s'), esc_html( $last_user->display_name ), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified));
     124                } else {
     125                        printf(__('Last edited on %1$s at %2$s'), mysql2date(get_option('date_format'), $post->post_modified), mysql2date(get_option('time_format'), $post->post_modified));
     126                }
     127                echo '</span>';
     128} ?>
     129</div>
    116130</div><!-- .misc-pub-section -->
    117131
    118132<div class="misc-pub-section misc-pub-visibility" id="visibility">