git-svn-id: https://develop.svn.wordpress.org/trunk@14445 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
0e9d18f366
commit
12196261a4
|
@ -1474,10 +1474,9 @@ class WP_Query {
|
|||
$this->is_home = true;
|
||||
|
||||
// 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($query) || !array_diff( array_keys($this->query), array('preview', 'page', 'paged', 'cpage') ) )
|
||||
) {
|
||||
if ( $this->is_home && 'page' == get_option('show_on_front') && get_option('page_on_front') ) {
|
||||
$_query = wp_parse_args($query);
|
||||
if ( empty($_query) || !array_diff( array_keys($_query), array('preview', 'page', 'paged', 'cpage') ) ) {
|
||||
$this->is_page = true;
|
||||
$this->is_home = false;
|
||||
$qv['page_id'] = get_option('page_on_front');
|
||||
|
@ -1487,6 +1486,7 @@ class WP_Query {
|
|||
unset($qv['paged']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( '' != $qv['pagename'] ) {
|
||||
$this->queried_object =& get_page_by_path($qv['pagename']);
|
||||
|
|
Loading…
Reference in New Issue