Ticket #12047: 12047.002.diff
File 12047.002.diff, 1.4 KB (added by , 15 years ago) |
---|
-
wp-includes/query.php
1481 1481 empty($this->query) || 1482 1482 !empty($qv['preview']) || 1483 1483 !empty($qv['cpage']) || 1484 !empty($qv['page']) || 1485 !empty($qv['paged']) 1484 !empty($qv['page']) 1486 1485 ) ) { 1487 1486 $this->is_page = true; 1488 1487 $this->is_home = false; … … 1726 1725 // Non-hierarchical post_types & parent-level-hierarchical post_types can directly use 'name' 1727 1726 $q['name'] = $q[ $ptype_obj->query_var ]; 1728 1727 } else { 1729 // Hierarchical post_types will operate through the 1728 // Hierarchical post_types will operate through the 1730 1729 $q['pagename'] = $q[ $ptype_obj->query_var ]; 1731 1730 $q['name'] = ''; 1732 1731 } … … 2489 2488 $stickies = $wpdb->get_results( "SELECT * FROM $wpdb->posts WHERE $wpdb->posts.ID IN ($stickies__in) $stickies_where" ); 2490 2489 foreach ( $stickies as $sticky_post ) { 2491 2490 // Ignore sticky posts the current user cannot read or are not published. 2492 if ( 'publish' != $sticky_post->post_status ) 2491 if ( 'publish' != $sticky_post->post_status ) 2493 2492 continue; 2494 2493 array_splice($this->posts, $sticky_offset, 0, array($sticky_post)); 2495 2494 $sticky_offset++; … … 2854 2853 2855 2854 return true; 2856 2855 } 2857 ?> 2858 No newline at end of file 2856 ?>