Make WordPress Core

Changeset 9529


Ignore:
Timestamp:
11/05/2008 07:19:52 PM (18 years ago)
Author:
azaozz
Message:

Show when future posts miss schedule, props hailin, fixes #8064

Location:
trunk/wp-admin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/css/colors-fresh.css

    r9518 r9529  
    10741074        background: #ddd;
    10751075}
     1076
     1077.attention {
     1078        color: #D54E21;
     1079}
  • trunk/wp-admin/includes/template.php

    r9520 r9529  
    12451245                                $time = get_post_time('G', true, $post);
    12461246
    1247                                 if ( ( abs(time() - $time) ) < 86400 ) {
    1248                                         if ( ( 'future' == $post->post_status) )
     1247                                $time_diff = time() - $time;
     1248
     1249                                if ( ( 'future' == $post->post_status) ) {
     1250                                        if ( $time_diff <= 0 ) {
    12491251                                                $h_time = sprintf( __('%s from now'), human_time_diff( $time ) );
     1252                                        } else {
     1253                                                $h_time = $t_time;
     1254                                                $missed = true;
     1255                                        }
     1256                                } else {
     1257
     1258                                        if ( $time_diff > 0 && $time_diff < 24*60*60 )
     1259                                                $h_time = sprintf( __('%s ago'), human_time_diff( $time ) );
    12501260                                        else
    1251                                                 $h_time = sprintf( __('%s ago'), human_time_diff( $time ) );
    1252                                 } else {
    1253                                         $h_time = mysql2date(__('Y/m/d'), $m_time);
     1261                                                $h_time = mysql2date(__('Y/m/d'), $m_time);
    12541262                                }
    12551263                        }
    … …  
    12611269                                echo '<abbr title="' . $t_time . '">' . apply_filters('post_date_column_time', $h_time, $post, $column_name, $mode) . '</abbr>';
    12621270                        echo '<br />';
    1263                         if ( 'publish' == $post->post_status || 'future' == $post->post_status )
     1271                        if ( 'publish' == $post->post_status ) {
    12641272                                _e('Published');
    1265                         else
     1273                        } elseif ( 'future' == $post->post_status ) {
     1274                                if ( isset($missed) )
     1275                                        echo '<strong class="attention">' . __('Missed schedule') . '</strong>';
     1276                                else
     1277                                        _e('Scheduled');
     1278                        } else {
    12661279                                _e('Last Modified');
     1280                        }
    12671281                        echo '</td>';
    12681282                break;
Note: See TracChangeset for help on using the changeset viewer.