From d85d717aedbc7690e2a450e40dab8fcebd94b38c Mon Sep 17 00:00:00 2001 From: donncha Date: Tue, 30 Oct 2007 16:49:38 +0000 Subject: Merge with WordPress 2.3.1 git-svn-id: http://svn.automattic.com/wordpress-mu/trunk@1139 7be80a69-a1ef-0310-a953-fb0f7c49ff36 --- wp-admin/edit.php | 111 +++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 90 insertions(+), 21 deletions(-) (limited to 'wp-admin/edit.php') diff --git a/wp-admin/edit.php b/wp-admin/edit.php index 6e8d978..ba4cc04 100644 --- a/wp-admin/edit.php +++ b/wp-admin/edit.php @@ -3,21 +3,67 @@ require_once('admin.php'); $title = __('Posts'); $parent_file = 'edit.php'; -wp_enqueue_script( 'admin-posts' ); -if ( 1 == $_GET['c'] ) - wp_enqueue_script( 'admin-comments' ); +wp_enqueue_script( 1 == $_GET['c'] ? 'admin-comments' : 'listman' ); require_once('admin-header.php'); -add_filter( 'post_limits', $limit_filter = create_function( '$a', '$b = split(" ",$a); if ( !isset($b[2]) ) return $a; $start = intval(trim($b[1])) / 20 * 15; if ( !is_int($start) ) return $a; return "LIMIT $start, 20";' ) ); -list($post_stati, $avail_post_stati) = wp_edit_posts_query(); -$wp_query->max_num_pages = ceil( $wp_query->found_posts / 15 ); // We grab 20 but only show 15 ( 5 more for ajax extra ) +$_GET['m'] = (int) $_GET['m']; +$_GET['cat'] = (int) $_GET['cat']; +$post_stati = array( // array( adj, noun ) + 'publish' => array(__('Published'), __('Published posts')), + 'future' => array(__('Scheduled'), __('Scheduled posts')), + 'pending' => array(__('Pending Review'), __('Pending posts')), + 'draft' => array(__('Draft'), _c('Drafts|manage posts header')), + 'private' => array(__('Private'), __('Private posts')) + ); + +$avail_post_stati = $wpdb->get_col("SELECT DISTINCT post_status FROM $wpdb->posts WHERE post_type = 'post'"); + +$post_status_q = ''; +$post_status_label = __('Posts'); +if ( isset($_GET['post_status']) && in_array( $_GET['post_status'], array_keys($post_stati) ) ) { + $post_status_label = $post_stati[$_GET['post_status']][1]; + $post_status_q = '&post_status=' . $_GET['post_status']; +} ?>
'display name' +$posts_columns = array(); +$posts_columns['id'] = '
' . __('ID') . '
'; +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'); +if ( !in_array($_GET['post_status'], array('pending', 'draft', 'future')) ) + $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 +$posts_columns['control_view'] = ''; +$posts_columns['control_edit'] = ''; +$posts_columns['control_delete'] = ''; ?> @@ -116,10 +162,6 @@ if ( $month_count && !( 1 == $month_count && 0 == $arc_result[0]->mmonth ) ) { ? - -
-- cgit