Show absolute date instead of relative date for scheduled posts

git-svn-id: http://svn.automattic.com/wordpress/trunk@10388 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2009-01-20 22:47:18 +00:00
parent cf3f91b0e6
commit 18213b4116

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');