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 ) {
|
if ( '0000-00-00 00:00:00' ==$post->post_date ) {
|
||||||
_e('Unpublished');
|
_e('Unpublished');
|
||||||
} else {
|
} else {
|
||||||
if ( ( time() - get_post_time() ) < 86400 )
|
if ( ( abs(time() - get_post_time()) ) < 86400 ) {
|
||||||
echo sprintf( __('%s ago'), human_time_diff( get_post_time() ) );
|
if ( ( 'future' == $post->post_status) )
|
||||||
|
echo sprintf( __('%s from now'), human_time_diff( get_post_time() ) );
|
||||||
else
|
else
|
||||||
|
echo sprintf( __('%s ago'), human_time_diff( get_post_time() ) );
|
||||||
|
} else {
|
||||||
the_time(__('Y/m/d'));
|
the_time(__('Y/m/d'));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
?></a></td>
|
?></a></td>
|
||||||
<?php
|
<?php
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue