mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
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:
+1
-1
@@ -61,7 +61,7 @@ foreach ($comments as $comment) {
|
||||
<?php endif; ?>
|
||||
|
||||
<?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>
|
||||
<h3><?php _e('Posts'); ?> <a href="edit.php" title="<?php _e('More posts...'); ?>">»</a></h3>
|
||||
|
||||
Reference in New Issue
Block a user