Changeset 8637 for trunk/wp-includes/query.php
- Timestamp:
- 08/13/2008 06:21:52 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/query.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/query.php
r8600 r8637 1524 1524 1525 1525 // Fetch sticky posts that weren't in the query results 1526 $stickies__in = implode(',', array_map( 'absint', $sticky_posts )); 1527 $stickies = $wpdb->get_results( "SELECT * FROM $wpdb->posts WHERE $wpdb->posts.ID IN ($stickies__in)" ); 1528 // TODO Make sure post is published or viewable by the current user 1529 foreach ( $stickies as $sticky_post ) { 1530 if ( 'publish' != $sticky_post->post_status ) 1531 continue; 1532 array_splice($this->posts, $sticky_offset, 0, array($sticky_post)); 1533 $sticky_offset++; 1526 if ( !empty($sticky_posts) ) { 1527 $stickies__in = implode(',', array_map( 'absint', $sticky_posts )); 1528 $stickies = $wpdb->get_results( "SELECT * FROM $wpdb->posts WHERE $wpdb->posts.ID IN ($stickies__in)" ); 1529 // TODO Make sure post is published or viewable by the current user 1530 foreach ( $stickies as $sticky_post ) { 1531 if ( 'publish' != $sticky_post->post_status ) 1532 continue; 1533 array_splice($this->posts, $sticky_offset, 0, array($sticky_post)); 1534 $sticky_offset++; 1535 } 1534 1536 } 1535 1537 }
Note: See TracChangeset
for help on using the changeset viewer.