From 18213b41160e47aed28a7956d1b251d8e5e1f831 Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 20 Jan 2009 22:47:18 +0000 Subject: [PATCH] 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 --- wp-admin/includes/template.php | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index 9c553a8ceb..f8d4c6edb5 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -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 ''; @@ -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 '' . __('Missed schedule') . ''; else _e('Scheduled');