Fix edit.php h2 text

git-svn-id: https://develop.svn.wordpress.org/trunk@6733 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-02-05 21:16:19 +00:00
parent 811dbba6cd
commit 71cb9095e4
2 changed files with 10 additions and 10 deletions

View File

@ -31,6 +31,9 @@ $posts_columns = wp_manage_posts_columns();
if ( is_single() ) {
printf(__('Comments on %s'), apply_filters( "the_title", $post->post_title));
} else {
$post_status_label = _c('Posts|manage posts header');
if ( isset($_GET['post_status']) && in_array( $_GET['post_status'], array_keys($post_stati) ) )
$post_status_label = $post_stati[$_GET['post_status']][1];
if ( $post_listing_pageable && !is_archive() && !is_search() )
$h2_noun = is_paged() ? sprintf(__( 'Previous %s' ), $post_status_label) : sprintf(__('Latest %s'), $post_status_label);
else
@ -68,7 +71,7 @@ foreach ( $post_stati as $status => $label ) {
$class = ' class="current"';
$status_links[] = "<li><a href=\"edit.php?post_status=$status\"$class>" .
sprintf($label[1], $num_posts) . '</a>';
sprintf($label[2], $num_posts) . '</a>';
}
$class = empty($_GET['post_status']) ? ' class="current"' : '';
$status_links[] = "<li><a href=\"edit.php\"$class>All Posts</a>";

View File

@ -488,21 +488,18 @@ function wp_edit_posts_query( $q = false ) {
$q['m'] = (int) $q['m'];
$q['cat'] = (int) $q['cat'];
$post_stati = array( // array( adj, noun )
'publish' => array(__('Published'), __('Published (%s)')),
'future' => array(__('Scheduled'), __('Scheduled (5s)')),
'pending' => array(__('Pending Review'), __('Pending Review (%s)')),
'draft' => array(__('Draft'), _c('Draft (%s)|manage posts header')),
'private' => array(__('Private'), __('Private (%s)'))
'publish' => array(__('Published'), __('Published posts'), __('Published (%s)')),
'future' => array(__('Scheduled'), __('Scheduled posts'), __('Scheduled (%s)')),
'pending' => array(__('Pending Review'), __('Pending posts'), __('Pending Review (%s)')),
'draft' => array(__('Draft'), _c('Drafts|manage posts header'), _c('Draft (%s)|manage posts header')),
'private' => array(__('Private'), __('Private posts'), __('Private (%s)'))
);
$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($q['post_status']) && in_array( $q['post_status'], array_keys($post_stati) ) ) {
$post_status_label = $post_stati[$q['post_status']][1];
if ( isset($q['post_status']) && in_array( $q['post_status'], array_keys($post_stati) ) )
$post_status_q = '&post_status=' . $q['post_status'];
}
if ( 'pending' === $q['post_status'] ) {
$order = 'ASC';