Changeset 7008

Show
Ignore:
Timestamp:
02/24/08 21:38:44 (9 months ago)
Author:
ryan
Message:

Date display fixes for manage comments.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/edit-comments.php

    r7007 r7008  
    190190        if ( strlen($author_url_display) > 50 ) 
    191191            $author_url_display = substr($author_url_display, 0, 49) . '...'; 
     192        $ptime = get_post_time('G', true); 
     193        if ( ( abs(time() - $ptime) ) < 86400 ) 
     194            $ptime = sprintf( __('%s ago'), human_time_diff( $ptime ) ); 
     195        else 
     196            $ptime = mysql2date(__('Y/m/d \a\t g:i A'), $post->post_date); 
    192197?> 
    193198  <tr id="comment-<?php echo $comment->comment_ID; ?>" class='<?php echo $class; ?>'> 
     
    204209    </p> 
    205210    <p><?php if ( 'list' == $mode ) comment_excerpt(); else comment_text(); ?></p> 
    206     <p><?php printf(__('From %1$s, %2$s at %3$s'), $post_link, get_the_time(get_option('date_format')), get_the_time()) ?></p> 
     211    <p><?php printf(__('From %1$s, %2$s'), $post_link, $ptime) ?></p> 
    207212    </td> 
    208     <td><?php comment_date(); ?></td> 
     213    <td><?php comment_date(__('Y/m/d')); ?></td> 
    209214    <td> 
    210215    <?php if ( current_user_can('edit_post', $comment->comment_post_ID) ) {