Add option to check caps when querying a particular post status. fixes #6052
git-svn-id: http://svn.automattic.com/wordpress/trunk@7109 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -81,13 +81,15 @@ if ( is_single() ) {
|
||||
<ul class="subsubsub">
|
||||
<?php
|
||||
$status_links = array();
|
||||
$num_posts = wp_count_posts('post');
|
||||
$num_posts = wp_count_posts('post', 'readable');
|
||||
foreach ( $post_stati as $status => $label ) {
|
||||
$class = '';
|
||||
|
||||
if ( !in_array($status, $avail_post_stati) )
|
||||
continue;
|
||||
|
||||
if ( empty($num_posts->$status) )
|
||||
continue;
|
||||
if ( $status == $_GET['post_status'] )
|
||||
$class = ' class="current"';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user