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:
ryan
2008-02-29 21:49:49 +00:00
parent 37c69acd2d
commit 884be4169f
5 changed files with 37 additions and 8 deletions

View File

@@ -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"';