-
+
+
+
+
@@ -167,6 +169,8 @@ if ('publish' != $post->post_status || 0 == $post_ID) {
?>
+
+
diff --git a/wp-admin/edit.php b/wp-admin/edit.php
index 9bcaeec59e..6d03527514 100644
--- a/wp-admin/edit.php
+++ b/wp-admin/edit.php
@@ -11,10 +11,13 @@ $_GET['cat'] = (int) $_GET['cat'];
$post_stati = array( // array( adj, noun )
'draft' => array(__('Draft'), _c('Drafts|manage posts header')),
'future' => array(__('Scheduled'), __('Scheduled posts')),
+ 'pending' => array(__('Pending Review'), __('Pending posts')),
'private' => array(__('Private'), __('Private posts')),
'publish' => array(__('Published'), __('Published posts'))
);
+$avail_post_stati = $wpdb->get_col("SELECT DISTINCT post_status FROM $wpdb->posts WHERE post_type = 'post'");
+
$post_status_q = '';
$post_status_label = _c('Posts|manage posts header');
if ( isset($_GET['post_status']) && in_array( $_GET['post_status'], array_keys($post_stati) ) ) {
@@ -30,14 +33,16 @@ if ( isset($_GET['post_status']) && in_array( $_GET['post_status'], array_keys($
wp("what_to_show=posts$post_status_q&posts_per_page=15");
// define the columns to display, the syntax is 'internal name' => 'display name'
-$posts_columns = array(
- 'id' => '
' . __('ID') . '
',
- 'date' => __('When'),
- 'title' => __('Title'),
- 'categories' => __('Categories'),
- 'comments' => '
' . __('Comments') . '
',
- 'author' => __('Author')
-);
+$posts_columns = array();
+$posts_columns['id'] = '
' . __('ID') . '
';
+if ( !in_array($_GET['post_status'], array('pending', 'draft')) )
+ $posts_columns['date'] = __('When');
+$posts_columns['title'] = __('Title');
+$posts_columns['categories'] = __('Categories');
+if ( 'publish' == $_GET['post_status'] )
+ $posts_columns['comments'] = '
' . __('Comments') . '
';
+$posts_columns['author'] = __('Author');
+
$posts_columns = apply_filters('manage_posts_columns', $posts_columns);
// you can not edit these at the moment
@@ -57,9 +62,14 @@ if ( is_single() ) {
$h2_noun = $post_status_label;
// Use $_GET instead of is_ since they can override each other
$h2_author = '';
- if ( isset($_GET['author']) && $_GET['author'] ) {
- $author_user = get_userdata( get_query_var( 'author' ) );
- $h2_author = ' ' . sprintf(__('by %s'), wp_specialchars( $author_user->display_name ));
+ $_GET['author'] = (int) $_GET['author'];
+ if ( $_GET['author'] != 0 ) {
+ if ( $_GET['author'] == '-' . $user_ID ) { // author exclusion
+ $h2_author = ' ' . __('by other authors');
+ } else {
+ $author_user = get_userdata( get_query_var( 'author' ) );
+ $h2_author = ' ' . sprintf(__('by %s'), wp_specialchars( $author_user->display_name ));
+ }
}
$h2_search = isset($_GET['s']) && $_GET['s'] ? ' ' . sprintf(__('matching “%s”'), wp_specialchars( get_search_query() ) ) : '';
$h2_cat = isset($_GET['cat']) && $_GET['cat'] ? ' ' . sprintf( __('in “%s”'), single_cat_title('', false) ) : '';
@@ -73,10 +83,10 @@ if ( is_single() ) {
-