Changeset 7752 for trunk/wp-includes/post.php
- Timestamp:
- 04/20/2008 09:26:10 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/post.php
r7747 r7752 828 828 829 829 $cache_key = $type; 830 if ( !empty($perm) )831 $cache_key .= '_' . $perm;832 830 833 831 $query = "SELECT post_status, COUNT( * ) AS num_posts FROM {$wpdb->posts} WHERE post_type = %s"; 834 832 if ( 'readable' == $perm && is_user_logged_in() ) { 835 833 if ( !current_user_can("read_private_{$type}s") ) { 836 $cache_key .= '_' . $ user->ID;834 $cache_key .= '_' . $perm . '_' . $user->ID; 837 835 $query .= " AND (post_status != 'private' OR ( post_author = '$user->ID' AND post_status = 'private' ))"; 838 836 }
Note: See TracChangeset
for help on using the changeset viewer.