mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
Add option to check caps when querying a particular post status. fixes #6052
git-svn-id: https://develop.svn.wordpress.org/trunk@7109 602fd350-edb4-49c9-b593-d223f7449a82
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