mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
Add private posts to Recent Posts for those who can read them. Props molecularbear. fixes #3877
git-svn-id: http://svn.automattic.com/wordpress/trunk@5191 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
3f0fa28e19
commit
1efba04041
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user