Make WordPress Core


Ignore:
Timestamp:
05/02/2010 09:28:11 PM (16 years ago)
Author:
dd32
Message:

Fix custom WP_Queries when using page_on_front. Props aaroncampbell. See #12391 (Which caused it), Fixes #12047

File:
1 edited

Legend:

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

    r14310 r14341  
    14761476                // Correct is_* for page_on_front and page_for_posts
    14771477                if (    $this->is_home &&
    1478                                 'page' == get_option('show_on_front') &&
    1479                                 get_option('page_on_front') &&
    1480                                 (
    1481                                         empty($this->query) ||
    1482                                         !empty($qv['preview']) ||
    1483                                         !empty($qv['cpage']) ||
    1484                                         !empty($qv['page']) ||
    1485                                         !empty($qv['paged'])
    1486                                 ) ) {
     1478                                'page' == get_option('show_on_front') && get_option('page_on_front') &&
     1479                                ( empty($query) || !array_diff( array_keys($this->query), array('preview', 'page', 'paged', 'cpage') ) )
     1480                                ) {
    14871481                        $this->is_page = true;
    14881482                        $this->is_home = false;
Note: See TracChangeset for help on using the changeset viewer.