Add private posts to Recent Posts for those who can read them. Props molecularbear. fixes #3877

git-svn-id: https://develop.svn.wordpress.org/trunk@5191 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
rob1n 2007-04-06 03:33:21 +00:00
parent 4a16bf61be
commit 172de9ed6d
1 changed files with 1 additions and 1 deletions

View File

@ -61,7 +61,7 @@ foreach ($comments as $comment) {
<?php endif; ?> <?php endif; ?>
<?php <?php
if ( $recentposts = $wpdb->get_results("SELECT ID, post_title FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish' AND post_date_gmt < '$today' ORDER BY post_date DESC LIMIT 5") ) : if ( $recentposts = $wpdb->get_results("SELECT ID, post_title FROM $wpdb->posts WHERE post_type = 'post' AND " . get_private_posts_cap_sql('post') . " AND post_date_gmt < '$today' ORDER BY post_date DESC LIMIT 5") ) :
?> ?>
<div> <div>
<h3><?php _e('Posts'); ?> <a href="edit.php" title="<?php _e('More posts...'); ?>">&raquo;</a></h3> <h3><?php _e('Posts'); ?> <a href="edit.php" title="<?php _e('More posts...'); ?>">&raquo;</a></h3>