Make WordPress Core


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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.