WordPress.org

Make WordPress Core

Changeset 10389


Ignore:
Timestamp:
01/20/09 23:07:21 (6 years ago)
Author:
ryan
Message:

Show absolute date instead of relative date for scheduled pages

File:
1 edited

Legend:

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

    r10388 r10389  
    15491549        if ( '0000-00-00 00:00:00' == $page->post_date && 'date' == $column_name ) { 
    15501550            $t_time = $h_time = __('Unpublished'); 
     1551            $time_diff = 0; 
    15511552        } else { 
    15521553            $t_time = get_the_time(__('Y/m/d g:i:s A')); 
     
    15541555            $time = get_post_time('G', true); 
    15551556 
    1556             if ( ( abs(time() - $time) ) < 86400 ) { 
    1557                 if ( ( 'future' == $page->post_status) ) 
    1558                     $h_time = sprintf( __('%s from now'), human_time_diff( $time ) ); 
    1559                 else 
    1560                     $h_time = sprintf( __('%s ago'), human_time_diff( $time ) ); 
    1561             } else { 
     1557            $time_diff = time() - $time; 
     1558 
     1559            if ( $time_diff > 0 && $time_diff < 24*60*60 ) 
     1560                $h_time = sprintf( __('%s ago'), human_time_diff( $time ) ); 
     1561            else 
    15621562                $h_time = mysql2date(__('Y/m/d'), $m_time); 
    1563             } 
    15641563        } 
    15651564        echo '<td ' . $attributes . '>'; 
    15661565        echo '<abbr title="' . $t_time . '">' . apply_filters('post_date_column_time', $h_time, $page, $column_name, '') . '</abbr>'; 
    15671566        echo '<br />'; 
    1568         if ( 'publish' == $page->post_status || 'future' == $page->post_status ) 
     1567        if ( 'publish' == $page->post_status ) { 
    15691568            _e('Published'); 
    1570         else 
     1569        } elseif ( 'future' == $page->post_status ) { 
     1570            if ( $time_diff > 0 ) 
     1571                echo '<strong class="attention">' . __('Missed schedule') . '</strong>'; 
     1572            else 
     1573                _e('Scheduled'); 
     1574        } else { 
    15711575            _e('Last Modified'); 
     1576        } 
    15721577        echo '</td>'; 
    15731578        break; 
Note: See TracChangeset for help on using the changeset viewer.