WordPress.org

Make WordPress Core

Changeset 6793


Ignore:
Timestamp:
02/11/2008 09:52:50 PM (13 years ago)
Author:
ryan
Message:

Fix human readable time offset for future posts. Props ffemtcj. fixes #5817

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-post-rows.php

    r6778 r6793  
    4848            _e('Unpublished');
    4949        } else {
    50             if ( ( time() - get_post_time() ) < 86400 )
    51                 echo sprintf( __('%s ago'), human_time_diff( get_post_time() ) );
    52             else
     50            if ( ( abs(time() - get_post_time()) ) < 86400 ) {
     51                if ( ( 'future' == $post->post_status) )
     52                    echo sprintf( __('%s from now'), human_time_diff( get_post_time() ) );
     53                else
     54                    echo sprintf( __('%s ago'), human_time_diff( get_post_time() ) );
     55            } else {
    5356                the_time(__('Y/m/d'));
     57            }
    5458        }
    5559        ?></a></td>
Note: See TracChangeset for help on using the changeset viewer.