mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Show when future posts miss schedule, props hailin, fixes #8064
git-svn-id: http://svn.automattic.com/wordpress/trunk@9529 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7663bd0168
commit
5584e7c4d4
@ -1073,3 +1073,7 @@ div.star.select:hover {
|
|||||||
border-color: #aaa;
|
border-color: #aaa;
|
||||||
background: #ddd;
|
background: #ddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.attention {
|
||||||
|
color: #D54E21;
|
||||||
|
}
|
||||||
|
@ -1244,12 +1244,20 @@ function _post_row($a_post, $pending_comments, $mode) {
|
|||||||
$m_time = $post->post_date;
|
$m_time = $post->post_date;
|
||||||
$time = get_post_time('G', true, $post);
|
$time = get_post_time('G', true, $post);
|
||||||
|
|
||||||
if ( ( abs(time() - $time) ) < 86400 ) {
|
$time_diff = time() - $time;
|
||||||
if ( ( 'future' == $post->post_status) )
|
|
||||||
|
if ( ( 'future' == $post->post_status) ) {
|
||||||
|
if ( $time_diff <= 0 ) {
|
||||||
$h_time = sprintf( __('%s from now'), human_time_diff( $time ) );
|
$h_time = sprintf( __('%s from now'), human_time_diff( $time ) );
|
||||||
else
|
|
||||||
$h_time = sprintf( __('%s ago'), human_time_diff( $time ) );
|
|
||||||
} else {
|
} 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);
|
$h_time = mysql2date(__('Y/m/d'), $m_time);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1260,10 +1268,16 @@ function _post_row($a_post, $pending_comments, $mode) {
|
|||||||
else
|
else
|
||||||
echo '<abbr title="' . $t_time . '">' . apply_filters('post_date_column_time', $h_time, $post, $column_name, $mode) . '</abbr>';
|
echo '<abbr title="' . $t_time . '">' . apply_filters('post_date_column_time', $h_time, $post, $column_name, $mode) . '</abbr>';
|
||||||
echo '<br />';
|
echo '<br />';
|
||||||
if ( 'publish' == $post->post_status || 'future' == $post->post_status )
|
if ( 'publish' == $post->post_status ) {
|
||||||
_e('Published');
|
_e('Published');
|
||||||
|
} elseif ( 'future' == $post->post_status ) {
|
||||||
|
if ( isset($missed) )
|
||||||
|
echo '<strong class="attention">' . __('Missed schedule') . '</strong>';
|
||||||
else
|
else
|
||||||
|
_e('Scheduled');
|
||||||
|
} else {
|
||||||
_e('Last Modified');
|
_e('Last Modified');
|
||||||
|
}
|
||||||
echo '</td>';
|
echo '</td>';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user