WordPress.org

Make WordPress Core

Changeset 14245


Ignore:
Timestamp:
04/26/10 22:12:28 (5 years ago)
Author:
ryan
Message:

The read_post cap cannot be checked for sticky posts because not logged in users don't have any caps. see #11197

File:
1 edited

Legend:

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

    r14217 r14245  
    24872487                foreach ( $stickies as $sticky_post ) { 
    24882488                    // Ignore sticky posts the current user cannot read or are not published. 
    2489                     if ( !current_user_can('read_post', $sticky_post->ID) || 'publish' != $sticky_post->post_status )  
     2489                    if ( 'publish' != $sticky_post->post_status )  
    24902490                        continue; 
    24912491                    array_splice($this->posts, $sticky_offset, 0, array($sticky_post)); 
Note: See TracChangeset for help on using the changeset viewer.