Move ping and trackback functions to comment.php (maybe to ping.php later?) #2525

git-svn-id: http://svn.automattic.com/wordpress/trunk@3900 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan
2006-06-22 19:44:36 +00:00
parent a4a52da923
commit e673d82afb
5 changed files with 247 additions and 242 deletions

View File

@@ -850,20 +850,19 @@ class WP_Query {
} else {
$where .= " AND (post_type = '$post_type' AND (post_status = 'publish'";
if ( is_admin() ) {
if ( is_admin() )
$where .= " OR post_status = 'future' OR post_status = 'draft'";
if ( is_user_logged_in() ) {
if ( 'post' == $post_type )
$cap = 'edit_private_posts';
else
$cap = 'edit_private_pages';
if ( is_user_logged_in() ) {
if ( 'post' == $post_type )
$cap = 'edit_private_posts';
else
$cap = 'edit_private_pages';
if ( current_user_can($cap) )
$where .= "OR post_status = 'private'";
else
$where .= " OR post_author = $user_ID AND post_status = 'private'";
}
if ( current_user_can($cap) )
$where .= " OR post_status = 'private'";
else
$where .= " OR post_author = $user_ID AND post_status = 'private'";
}
$where .= '))';