Changeset 3772 for trunk/wp-includes/query.php
- Timestamp:
- 05/11/2006 11:13:35 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/query.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/query.php
r3767 r3772 829 829 $where .= " AND (post_type = '$post_type' AND (post_status = 'publish'"; 830 830 831 if ( is_admin() ) 831 if ( is_admin() ) { 832 832 $where .= " OR post_status = 'future' OR post_status = 'draft'"; 833 833 834 if ( is_user_logged_in() ) 835 $where .= " OR post_author = $user_ID AND post_status = 'private'))"; 836 else 837 $where .= '))'; 834 if ( is_user_logged_in() ) { 835 if ( 'post' == $post_type ) 836 $cap = 'edit_private_posts'; 837 else 838 $cap = 'edit_private_pages'; 839 840 if ( current_user_can($cap) ) 841 $where .= "OR post_status = 'private'"; 842 else 843 $where .= " OR post_author = $user_ID AND post_status = 'private'"; 844 } 845 } 846 847 $where .= '))'; 838 848 } 839 849
Note: See TracChangeset
for help on using the changeset viewer.