Make WordPress Core

Changeset 9110


Ignore:
Timestamp:
10/09/2008 06:40:30 AM (16 years ago)
Author:
azaozz
Message:

Use "Date" instead of "Modified" when listing drafts and pending posts, since now they have a proper date.

File:
1 edited

Legend:

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

    r9109 r9110  
    688688    $posts_columns['cb'] = '<input type="checkbox" />';
    689689    $posts_columns['title'] = __('Title');
    690     if ( isset($_GET['post_status']) && 'draft' === $_GET['post_status'] )
    691         $posts_columns['modified'] = __('Modified');
    692     elseif ( isset($_GET['post_status']) && 'pending' === $_GET['post_status'] )
    693         $posts_columns['modified'] = __('Submitted');
    694     else
    695         $posts_columns['date'] = __('Date');
     690    $posts_columns['date'] = __('Date');
    696691    $posts_columns['author'] = __('Author');
    697692    $posts_columns['categories'] = __('Categories');
     
    740735    $posts_columns = array();
    741736    $posts_columns['cb'] = '<input type="checkbox" />';
    742 
    743737    $posts_columns['title'] = __('Title');
    744 
    745     if ( isset($_GET['post_status']) && 'draft' === $_GET['post_status'] )
    746         $posts_columns['modified'] = __('Modified');
    747     elseif ( isset($_GET['post_status']) && 'pending' === $_GET['post_status'] )
    748         $posts_columns['modified'] = __('Submitted');
    749     else
    750         $posts_columns['date'] = __('Date');
    751 
     738    $posts_columns['date'] = __('Date');
    752739    $posts_columns['author'] = __('Author');
    753740    if ( !in_array($post_status, array('pending', 'draft', 'future')) )
     
    927914                break;
    928915
    929             case 'modified':
    930916            case 'date':
    931917                if ( ! $bulk ) { ?>
     
    12581244        break;
    12591245
    1260         case 'modified':
    12611246        case 'date':
    12621247            if ( '0000-00-00 00:00:00' == $post->post_date && 'date' == $column_name ) {
    12631248                $t_time = $h_time = __('Unpublished');
    12641249            } else {
    1265                 if ( 'modified' == $column_name ) {
    1266                     $t_time = get_the_modified_time(__('Y/m/d g:i:s A'));
    1267                     $m_time = $post->post_modified;
    1268                     $time = get_post_modified_time('G', true);
    1269                 } else {
    1270                     $t_time = get_the_time(__('Y/m/d g:i:s A'));
    1271                     $m_time = $post->post_date;
    1272                     $time = get_post_time('G', true);
    1273                 }
     1250                $t_time = get_the_time(__('Y/m/d g:i:s A'));
     1251                $m_time = $post->post_date;
     1252                $time = get_post_time('G', true);
     1253
    12741254                if ( ( abs(time() - $time) ) < 86400 ) {
    12751255                    if ( ( 'future' == $post->post_status) )
     
    14811461        <?php
    14821462        break;
    1483     case 'modified':
    14841463    case 'date':
    14851464        if ( '0000-00-00 00:00:00' == $page->post_date && 'date' == $column_name ) {
    14861465            $t_time = $h_time = __('Unpublished');
    14871466        } else {
    1488             if ( 'modified' == $column_name ) {
    1489                 $t_time = get_the_modified_time(__('Y/m/d g:i:s A'));
    1490                 $m_time = $page->post_modified;
    1491                 $time = get_post_modified_time('G', true);
    1492             } else {
    1493                 $t_time = get_the_time(__('Y/m/d g:i:s A'));
    1494                 $m_time = $page->post_date;
    1495                 $time = get_post_time('G', true);
    1496             }
     1467            $t_time = get_the_time(__('Y/m/d g:i:s A'));
     1468            $m_time = $page->post_date;
     1469            $time = get_post_time('G', true);
     1470
    14971471            if ( ( abs(time() - $time) ) < 86400 ) {
    14981472                if ( ( 'future' == $page->post_status) )
Note: See TracChangeset for help on using the changeset viewer.