Show absolute date instead of relative date for scheduled posts

git-svn-id: https://develop.svn.wordpress.org/trunk@10388 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2009-01-20 22:47:18 +00:00
parent a60f3571bc
commit 05226d13fe
1 changed files with 6 additions and 15 deletions

View File

@ -1346,6 +1346,7 @@ function _post_row($a_post, $pending_comments, $mode) {
case 'date':
if ( '0000-00-00 00:00:00' == $post->post_date && 'date' == $column_name ) {
$t_time = $h_time = __('Unpublished');
$time_diff = 0;
} else {
$t_time = get_the_time(__('Y/m/d g:i:s A'));
$m_time = $post->post_date;
@ -1353,20 +1354,10 @@ function _post_row($a_post, $pending_comments, $mode) {
$time_diff = time() - $time;
if ( ( 'future' == $post->post_status) ) {
if ( $time_diff <= 0 ) {
$h_time = sprintf( __('%s from now'), human_time_diff( $time ) );
} else {
$h_time = $t_time;
$missed = true;
}
} else {
if ( $time_diff > 0 && $time_diff < 24*60*60 )
$h_time = sprintf( __('%s ago'), human_time_diff( $time ) );
else
$h_time = mysql2date(__('Y/m/d'), $m_time);
}
if ( $time_diff > 0 && $time_diff < 24*60*60 )
$h_time = sprintf( __('%s ago'), human_time_diff( $time ) );
else
$h_time = mysql2date(__('Y/m/d'), $m_time);
}
echo '<td ' . $attributes . '>';
@ -1378,7 +1369,7 @@ function _post_row($a_post, $pending_comments, $mode) {
if ( 'publish' == $post->post_status ) {
_e('Published');
} elseif ( 'future' == $post->post_status ) {
if ( isset($missed) )
if ( $time_diff > 0 )
echo '<strong class="attention">' . __('Missed schedule') . '</strong>';
else
_e('Scheduled');