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

git-svn-id: https://develop.svn.wordpress.org/trunk@14341 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse 2010-05-02 21:28:11 +00:00
parent 0948137d65
commit 65aac68cd6

View File

@ -1475,15 +1475,9 @@ class WP_Query {
// Correct is_* for page_on_front and page_for_posts
if ( $this->is_home &&
'page' == get_option('show_on_front') &&
get_option('page_on_front') &&
(
empty($this->query) ||
!empty($qv['preview']) ||
!empty($qv['cpage']) ||
!empty($qv['page']) ||
!empty($qv['paged'])
) ) {
'page' == get_option('show_on_front') && get_option('page_on_front') &&
( empty($query) || !array_diff( array_keys($this->query), array('preview', 'page', 'paged', 'cpage') ) )
) {
$this->is_page = true;
$this->is_home = false;
$qv['page_id'] = get_option('page_on_front');