Make WordPress Core

Ticket #12047: 12047.001.diff

File 12047.001.diff, 1.4 KB (added by aaroncampbell, 15 years ago)
  • wp-includes/query.php

     
    14761476                // Correct is_* for page_on_front and page_for_posts
    14771477                if (    $this->is_home &&
    14781478                                'page' == get_option('show_on_front') &&
     1479                                ( empty($this->query) || $qv['preview'] == 'true' ) &&
    14791480                                get_option('page_on_front') &&
    14801481                                (
    14811482                                        empty($this->query) ||
     
    17261727                                        // Non-hierarchical post_types & parent-level-hierarchical post_types can directly use 'name'
    17271728                                        $q['name'] = $q[ $ptype_obj->query_var ];
    17281729                                } else {
    1729                                         // Hierarchical post_types will operate through the 
     1730                                        // Hierarchical post_types will operate through the
    17301731                                        $q['pagename'] = $q[ $ptype_obj->query_var ];
    17311732                                        $q['name'] = '';
    17321733                                }
     
    24892490                                $stickies = $wpdb->get_results( "SELECT * FROM $wpdb->posts WHERE $wpdb->posts.ID IN ($stickies__in) $stickies_where" );
    24902491                                foreach ( $stickies as $sticky_post ) {
    24912492                                        // 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 )
    24932494                                                continue;
    24942495                                        array_splice($this->posts, $sticky_offset, 0, array($sticky_post));
    24952496                                        $sticky_offset++;
     
    28542855
    28552856        return true;
    28562857}
    2857 ?>
    2858  No newline at end of file
     2858?>