Index: wp-admin/includes/class-wp-posts-list-table.php =================================================================== --- wp-admin/includes/class-wp-posts-list-table.php (revision 18667) +++ wp-admin/includes/class-wp-posts-list-table.php (working copy) @@ -71,7 +71,12 @@ if ( 'post' == $post_type && $sticky_posts = get_option( 'sticky_posts' ) ) { $sticky_posts = implode( ', ', array_map( 'absint', (array) $sticky_posts ) ); - $this->sticky_posts_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT( 1 ) FROM $wpdb->posts WHERE post_type = %s AND post_status != 'trash' AND ID IN ($sticky_posts)", $post_type ) ); + + $this->sticky_posts_count = $wpdb->get_var( $wpdb->prepare( " + SELECT COUNT( 1 ) FROM $wpdb->posts + WHERE post_type = %s AND post_status != 'trash' + AND ID IN ($sticky_posts) + ", $post_type ) ); } parent::__construct( array( @@ -142,7 +147,10 @@ if ( $this->user_posts_count ) { if ( isset( $_GET['author'] ) && ( $_GET['author'] == $current_user_id ) ) $class = ' class="current"'; - $status_links['mine'] = "" . sprintf( _nx( 'Mine (%s)', 'Mine (%s)', $this->user_posts_count, 'posts' ), number_format_i18n( $this->user_posts_count ) ) . ''; + + $status_links['mine'] = "" . + sprintf( _nx( 'Mine (%s)', 'Mine (%s)', $this->user_posts_count, 'posts' ), number_format_i18n( $this->user_posts_count ) ) . ''; + $allposts = '&all_posts=1'; } @@ -153,7 +161,8 @@ $total_posts -= $num_posts->$state; $class = empty( $class ) && empty( $_REQUEST['post_status'] ) && empty( $_REQUEST['show_sticky'] ) ? ' class="current"' : ''; - $status_links['all'] = "" . sprintf( _nx( 'All (%s)', 'All (%s)', $total_posts, 'posts' ), number_format_i18n( $total_posts ) ) . ''; + $status_links['all'] = "" . + sprintf( _nx( 'All (%s)', 'All (%s)', $total_posts, 'posts' ), number_format_i18n( $total_posts ) ) . ''; foreach ( get_post_stati(array('show_in_admin_status_list' => true), 'objects') as $status ) { $class = ''; @@ -169,7 +178,8 @@ if ( isset($_REQUEST['post_status']) && $status_name == $_REQUEST['post_status'] ) $class = ' class="current"'; - $status_links[$status_name] = "" . sprintf( translate_nooped_plural( $status->label_count, $num_posts->$status_name ), number_format_i18n( $num_posts->$status_name ) ) . ''; + $status_links[$status_name] = "" . + sprintf( translate_nooped_plural( $status->label_count, $num_posts->$status_name ), number_format_i18n( $num_posts->$status_name ) ) . ''; } if ( ! empty( $this->sticky_posts_count ) ) { @@ -289,6 +299,7 @@ $posts_columns = apply_filters( 'manage_pages_columns', $posts_columns ); else $posts_columns = apply_filters( 'manage_posts_columns', $posts_columns, $post_type ); + $posts_columns = apply_filters( "manage_{$post_type}_posts_columns", $posts_columns ); return $posts_columns; @@ -479,7 +490,9 @@ $post_format = get_post_format( $post->ID ); $post_format_class = ( $post_format && !is_wp_error($post_format) ) ? 'format-' . sanitize_html_class( $post_format ) : 'format-default'; ?> -