Changeset 5579

Show
Ignore:
Timestamp:
05/28/07 20:39:24 (1 year ago)
Author:
rob1n
Message:

Add a is_user_logged_in() check.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-includes/query.php

    r5575 r5579  
    10251025            if ( is_admin() ) 
    10261026                $where .= " OR post_status = 'future' OR post_status = 'draft'"; 
    1027  
    1028             $where .= current_user_can( "read_private_{$post_type}s" ) ? " OR post_status = 'private'" : " OR post_author = $user_ID AND post_status = 'private'"; 
     1027             
     1028            if ( is_user_logged_in() ) { 
     1029                $where .= current_user_can( "read_private_{$post_type}s" ) ? " OR post_status = 'private'" : " OR post_author = $user_ID AND post_status = 'private'"; 
     1030            } 
    10291031 
    10301032            $where .= ')';