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