Make WordPress Core


Ignore:
Timestamp:
05/12/2010 07:39:30 PM (14 years ago)
Author:
nacin
Message:

Use correct cap check. see #13358.

File:
1 edited

Legend:

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

    r14571 r14584  
    15261526    if ( 'readable' == $perm && is_user_logged_in() ) {
    15271527        $post_type_object = get_post_type_object($type);
    1528         if ( !current_user_can("read_private_{$post_type_object->capability_type}s") ) {
     1528        if ( !current_user_can( $post_type_object->read_private_cap ) ) {
    15291529            $cache_key .= '_' . $perm . '_' . $user->ID;
    15301530            $query .= " AND (post_status != 'private' OR ( post_author = '$user->ID' AND post_status = 'private' ))";
Note: See TracChangeset for help on using the changeset viewer.