From 37abfcb33f871f3e3abe4414f62f0fcab1bba3d2 Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 20 Jan 2009 23:07:21 +0000 Subject: [PATCH] Show absolute date instead of relative date for scheduled pages git-svn-id: http://svn.automattic.com/wordpress/trunk@10389 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/template.php | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/wp-admin/includes/template.php b/wp-admin/includes/template.php index f8d4c6edb5..e8d6bad67e 100644 --- a/wp-admin/includes/template.php +++ b/wp-admin/includes/template.php @@ -1548,27 +1548,32 @@ foreach ($posts_columns as $column_name=>$column_display_name) { case 'date': if ( '0000-00-00 00:00:00' == $page->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 = $page->post_date; $time = get_post_time('G', true); - if ( ( abs(time() - $time) ) < 86400 ) { - if ( ( 'future' == $page->post_status) ) - $h_time = sprintf( __('%s from now'), human_time_diff( $time ) ); - else - $h_time = sprintf( __('%s ago'), human_time_diff( $time ) ); - } else { + $time_diff = time() - $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 ''; echo '' . apply_filters('post_date_column_time', $h_time, $page, $column_name, '') . ''; echo '
'; - if ( 'publish' == $page->post_status || 'future' == $page->post_status ) + if ( 'publish' == $page->post_status ) { _e('Published'); - else + } elseif ( 'future' == $page->post_status ) { + if ( $time_diff > 0 ) + echo '' . __('Missed schedule') . ''; + else + _e('Scheduled'); + } else { _e('Last Modified'); + } echo ''; break; case 'title':