remove leading <li> from get_views() and add it later. Fixes #15321
git-svn-id: http://svn.automattic.com/wordpress/trunk@16205 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -142,7 +142,7 @@ class WP_Posts_List_Table extends WP_List_Table {
|
||||
if ( $this->user_posts_count ) {
|
||||
if ( isset( $_GET['author'] ) && ( $_GET['author'] == $current_user_id ) )
|
||||
$class = ' class="current"';
|
||||
$status_links['mine'] = "<li><a href='edit.php?post_type=$post_type&author=$current_user_id'$class>" . sprintf( _nx( 'Mine <span class="count">(%s)</span>', 'Mine <span class="count">(%s)</span>', $this->user_posts_count, 'posts' ), number_format_i18n( $this->user_posts_count ) ) . '</a>';
|
||||
$status_links['mine'] = "<a href='edit.php?post_type=$post_type&author=$current_user_id'$class>" . sprintf( _nx( 'Mine <span class="count">(%s)</span>', 'Mine <span class="count">(%s)</span>', $this->user_posts_count, 'posts' ), number_format_i18n( $this->user_posts_count ) ) . '</a>';
|
||||
$allposts = '&all_posts=1';
|
||||
}
|
||||
|
||||
@@ -153,7 +153,7 @@ class WP_Posts_List_Table extends WP_List_Table {
|
||||
$total_posts -= $num_posts->$state;
|
||||
|
||||
$class = empty( $class ) && empty( $_REQUEST['post_status'] ) && empty( $_REQUEST['show_sticky'] ) ? ' class="current"' : '';
|
||||
$status_links['all'] = "<li><a href='edit.php?post_type=$post_type{$allposts}'$class>" . sprintf( _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_posts, 'posts' ), number_format_i18n( $total_posts ) ) . '</a>';
|
||||
$status_links['all'] = "<a href='edit.php?post_type=$post_type{$allposts}'$class>" . sprintf( _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_posts, 'posts' ), number_format_i18n( $total_posts ) ) . '</a>';
|
||||
|
||||
foreach ( get_post_stati(array('show_in_admin_status_list' => true), 'objects') as $status ) {
|
||||
$class = '';
|
||||
@@ -169,13 +169,13 @@ class WP_Posts_List_Table extends WP_List_Table {
|
||||
if ( isset($_REQUEST['post_status']) && $status_name == $_REQUEST['post_status'] )
|
||||
$class = ' class="current"';
|
||||
|
||||
$status_links[$status_name] = "<li><a href='edit.php?post_status=$status_name&post_type=$post_type'$class>" . sprintf( translate_nooped_plural( $status->label_count, $num_posts->$status_name ), number_format_i18n( $num_posts->$status_name ) ) . '</a>';
|
||||
$status_links[$status_name] = "<a href='edit.php?post_status=$status_name&post_type=$post_type'$class>" . sprintf( translate_nooped_plural( $status->label_count, $num_posts->$status_name ), number_format_i18n( $num_posts->$status_name ) ) . '</a>';
|
||||
}
|
||||
|
||||
if ( ! empty( $this->sticky_posts_count ) ) {
|
||||
$class = ! empty( $_REQUEST['show_sticky'] ) ? ' class="current"' : '';
|
||||
|
||||
$sticky_link = array( 'sticky' => "<li><a href='edit.php?post_type=$post_type&show_sticky=1'$class>" . sprintf( _nx( 'Sticky <span class="count">(%s)</span>', 'Sticky <span class="count">(%s)</span>', $this->sticky_posts_count, 'posts' ), number_format_i18n( $this->sticky_posts_count ) ) . '</a>' );
|
||||
$sticky_link = array( 'sticky' => "<a href='edit.php?post_type=$post_type&show_sticky=1'$class>" . sprintf( _nx( 'Sticky <span class="count">(%s)</span>', 'Sticky <span class="count">(%s)</span>', $this->sticky_posts_count, 'posts' ), number_format_i18n( $this->sticky_posts_count ) ) . '</a>' );
|
||||
|
||||
// Sticky comes after Publish, or if not listed, after All.
|
||||
$split = 1 + array_search( ( isset( $status_links['publish'] ) ? 'publish' : 'all' ), array_keys( $status_links ) );
|
||||
|
||||
Reference in New Issue
Block a user