WordPress.org

Make WordPress Core

Changeset 10388


Ignore:
Timestamp:
01/20/2009 10:47:18 PM (9 years ago)
Author:
ryan
Message:

Show absolute date instead of relative date for scheduled posts

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/template.php

    r10362 r10388  
    13471347            if ( '0000-00-00 00:00:00' == $post->post_date && 'date' == $column_name ) {
    13481348                $t_time = $h_time = __('Unpublished');
     1349                $time_diff = 0;
    13491350            } else {
    13501351                $t_time = get_the_time(__('Y/m/d g:i:s A'));
     
    13541355                $time_diff = time() - $time;
    13551356
    1356                 if ( ( 'future' == $post->post_status) ) {
    1357                     if ( $time_diff <= 0 ) {
    1358                         $h_time = sprintf( __('%s from now'), human_time_diff( $time ) );
    1359                     } else {
    1360                         $h_time = $t_time;
    1361                         $missed = true;
    1362                     }
    1363                 } else {
    1364 
    1365                     if ( $time_diff > 0 && $time_diff < 24*60*60 )
    1366                         $h_time = sprintf( __('%s ago'), human_time_diff( $time ) );
    1367                     else
    1368                         $h_time = mysql2date(__('Y/m/d'), $m_time);
    1369                 }
     1357                if ( $time_diff > 0 && $time_diff < 24*60*60 )
     1358                    $h_time = sprintf( __('%s ago'), human_time_diff( $time ) );
     1359                else
     1360                    $h_time = mysql2date(__('Y/m/d'), $m_time);
    13701361            }
    13711362
     
    13791370                _e('Published');
    13801371            } elseif ( 'future' == $post->post_status ) {
    1381                 if ( isset($missed) )
     1372                if ( $time_diff > 0 )
    13821373                    echo '<strong class="attention">' . __('Missed schedule') . '</strong>';
    13831374                else
Note: See TracChangeset for help on using the changeset viewer.