Fix human readable time offset for future posts. Props ffemtcj. fixes #5817
git-svn-id: http://svn.automattic.com/wordpress/trunk@6793 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
5117b06a45
commit
081e7089a8
|
@ -47,11 +47,15 @@ foreach($posts_columns as $column_name=>$column_display_name) {
|
|||
if ( '0000-00-00 00:00:00' ==$post->post_date ) {
|
||||
_e('Unpublished');
|
||||
} else {
|
||||
if ( ( time() - get_post_time() ) < 86400 )
|
||||
echo sprintf( __('%s ago'), human_time_diff( get_post_time() ) );
|
||||
if ( ( abs(time() - get_post_time()) ) < 86400 ) {
|
||||
if ( ( 'future' == $post->post_status) )
|
||||
echo sprintf( __('%s from now'), human_time_diff( get_post_time() ) );
|
||||
else
|
||||
echo sprintf( __('%s ago'), human_time_diff( get_post_time() ) );
|
||||
} else {
|
||||
the_time(__('Y/m/d'));
|
||||
}
|
||||
}
|
||||
?></a></td>
|
||||
<?php
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue