Show absolute date instead of relative date for scheduled pages

git-svn-id: https://develop.svn.wordpress.org/trunk@10389 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2009-01-20 23:07:21 +00:00
parent 05226d13fe
commit e80027f5fd
1 changed files with 14 additions and 9 deletions

View File

@ -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 '<td ' . $attributes . '>';
echo '<abbr title="' . $t_time . '">' . apply_filters('post_date_column_time', $h_time, $page, $column_name, '') . '</abbr>';
echo '<br />';
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 '<strong class="attention">' . __('Missed schedule') . '</strong>';
else
_e('Scheduled');
} else {
_e('Last Modified');
}
echo '</td>';
break;
case 'title':