Make WordPress Core

Changeset 4940


Ignore:
Timestamp:
02/25/2007 01:39:34 PM (18 years ago)
Author:
markjaquith
Message:

Use correct capabilities checks when determining whether to show private posts. Props molecularbear. fixes #3827

File:
1 edited

Legend:

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

    r4934 r4940  
    967967            if ( is_user_logged_in() ) {
    968968                if ( 'post' == $post_type )
    969                     $cap = 'edit_private_posts';
     969                    $cap = 'read_private_posts';
    970970                else
    971                     $cap = 'edit_private_pages';
     971                    $cap = 'read_private_pages';
    972972
    973973                if ( current_user_can($cap) )
Note: See TracChangeset for help on using the changeset viewer.