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