Make WordPress Core

Ticket #5817: r6787__readable_time.diff

File r6787__readable_time.diff, 810 bytes (added by ffemtcj, 17 years ago)

Adds corect tense to time

  • wp-admin/edit-post-rows.php

     
    4848                        _e('Unpublished');
    4949                } else {
    5050                        if ( ( time() - get_post_time() ) < 86400 )
    51                                 echo sprintf( __('%s ago'), human_time_diff( get_post_time() ) );
    52                         else
     51                                if ( ( 'publish' ==$post->post_status) ) { // checks to see if post has already published. If true post has a past tense, return is %s ago
     52                                        echo sprintf( __('%s ago'), human_time_diff( get_post_time() ) );
     53                                } else { // otherwise post happens in future, return if %s from now
     54                                        echo sprintf( __('%s from now'), human_time_diff( get_post_time() ) );
     55                        } else
    5356                                the_time(__('Y/m/d'));
    5457                }
    5558                ?></a></td>