mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-30 10:14:31 +00:00
Ordering and labeling niceties for the Manage > Posts screen. see #4446
git-svn-id: https://develop.svn.wordpress.org/trunk@5751 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -30,12 +30,27 @@ if ( isset($_GET['post_status']) && in_array( $_GET['post_status'], array_keys($
|
||||
|
||||
<?php
|
||||
|
||||
wp("what_to_show=posts$post_status_q&posts_per_page=15");
|
||||
if ( 'pending' === $_GET['post_status'] ) {
|
||||
$order = 'ASC';
|
||||
$orderby = 'modified';
|
||||
} elseif ( 'draft' === $_GET['post_status'] ) {
|
||||
$order = 'DESC';
|
||||
$orderby = 'modified';
|
||||
} else {
|
||||
$order = 'DESC';
|
||||
$orderby = 'date';
|
||||
}
|
||||
|
||||
wp("what_to_show=posts$post_status_q&posts_per_page=15&order=$order&orderby=$orderby");
|
||||
|
||||
// define the columns to display, the syntax is 'internal name' => 'display name'
|
||||
$posts_columns = array();
|
||||
$posts_columns['id'] = '<div style="text-align: center">' . __('ID') . '</div>';
|
||||
if ( !in_array($_GET['post_status'], array('pending', 'draft')) )
|
||||
if ( 'draft' === $_GET['post_status'] )
|
||||
$posts_columns['modified'] = __('Modified');
|
||||
elseif ( 'pending' === $_GET['post_status'] )
|
||||
$posts_columns['modified'] = __('Submitted');
|
||||
else
|
||||
$posts_columns['date'] = __('When');
|
||||
$posts_columns['title'] = __('Title');
|
||||
$posts_columns['categories'] = __('Categories');
|
||||
|
||||
Reference in New Issue
Block a user