WordPress.org

Make WordPress Core

Changeset 6856


Ignore:
Timestamp:
02/15/2008 06:44:17 AM (14 years ago)
Author:
ryan
Message:

Put full post date and time in link title. Clean up date display for drafts. see #5813

File:
1 edited

Legend:

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

    r6854 r6856  
    3838        break;
    3939    case 'modified':
    40         ?>
    41         <td><?php if ( '0000-00-00 00:00:00' ==$post->post_modified ) _e('Never'); else the_modified_time(__('Y/m/d \<\b\r \/\> g:i:s a')); ?></td>
    42         <?php
    43         break;
    4440    case 'date':
    45         ?>
    46         <td><a href="<?php the_permalink(); ?>" rel="permalink">
    47         <?php
    48         if ( '0000-00-00 00:00:00' ==$post->post_date ) {
    49             _e('Unpublished');
     41        if ( '0000-00-00 00:00:00' == $post->post_date && 'date' == $column_name ) {
     42            $t_time = $h_time = __('Unpublished');
    5043        } else {
    51             if ( ( abs(time() - get_post_time()) ) < 86400 ) {
     44            if ( 'modified' == $column_name ) {
     45                $t_time = get_the_modified_time(__('Y/m/d g:i:s A'));
     46                $m_time = $post->post_modified;
     47                $time = get_post_modified_time();
     48            } else {
     49                $t_time = get_the_time(__('Y/m/d g:i:s A'));
     50                $m_time = $post->post_date;
     51                $time = get_post_time();
     52            }
     53            if ( ( abs(time() - $time) ) < 86400 ) {
    5254                if ( ( 'future' == $post->post_status) )
    53                     echo sprintf( __('%s from now'), human_time_diff( get_post_time() ) );
     55                    $h_time = sprintf( __('%s from now'), human_time_diff( $time ) );
    5456                else
    55                     echo sprintf( __('%s ago'), human_time_diff( get_post_time() ) );
     57                    $h_time = sprintf( __('%s ago'), human_time_diff( $time ) );
    5658            } else {
    57                 the_time(__('Y/m/d'));
     59                $h_time = mysql2date(__('Y/m/d'), $m_time);
    5860            }
    5961        }
    60         ?></a></td>
     62        ?>
     63        <td><a href="<?php the_permalink(); ?>" rel="permalink" title="<?php echo $t_time ?>"><?php echo $h_time ?></a></td>
    6164        <?php
    6265        break;
Note: See TracChangeset for help on using the changeset viewer.