WordPress.org

Make WordPress Core

Changeset 5751


Ignore:
Timestamp:
06/24/2007 06:25:49 AM (11 years ago)
Author:
markjaquith
Message:

Ordering and labeling niceties for the Manage > Posts screen. see #4446

Location:
trunk/wp-admin
Files:
2 edited

Legend:

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

    r5707 r5751  
    3030        <?php
    3131        break;
    32 
     32    case 'modified':
     33        ?>
     34        <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>
     35        <?php
     36        break;
    3337    case 'date':
    3438        ?>
  • trunk/wp-admin/edit.php

    r5748 r5751  
    3131<?php
    3232
    33 wp("what_to_show=posts$post_status_q&posts_per_page=15");
     33if ( 'pending' === $_GET['post_status'] ) {
     34    $order = 'ASC';
     35    $orderby = 'modified';
     36} elseif ( 'draft' === $_GET['post_status'] ) {
     37    $order = 'DESC';
     38    $orderby = 'modified';
     39} else {
     40    $order = 'DESC';
     41    $orderby = 'date';
     42}
     43
     44wp("what_to_show=posts$post_status_q&posts_per_page=15&order=$order&orderby=$orderby");
    3445
    3546// define the columns to display, the syntax is 'internal name' => 'display name'
    3647$posts_columns = array();
    3748$posts_columns['id'] = '<div style="text-align: center">' . __('ID') . '</div>';
    38 if ( !in_array($_GET['post_status'], array('pending', 'draft')) )
     49if ( 'draft' === $_GET['post_status'] )
     50    $posts_columns['modified'] = __('Modified');
     51elseif ( 'pending' === $_GET['post_status'] )
     52    $posts_columns['modified'] = __('Submitted');
     53else
    3954    $posts_columns['date'] = __('When');
    4055$posts_columns['title'] = __('Title');
Note: See TracChangeset for help on using the changeset viewer.