Ignore 'name' qv if 'p' qv is set. Fixes #15433
git-svn-id: https://develop.svn.wordpress.org/trunk@16384 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
0e7fb842ec
commit
4c4e5ed0df
|
@ -1822,7 +1822,7 @@ class WP_Query {
|
||||||
unset($ptype_obj);
|
unset($ptype_obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( '' != $q['name'] ) {
|
if ( '' != $q['name'] && !$q['p'] ) {
|
||||||
$q['name'] = sanitize_title_for_query( $q['name'] );
|
$q['name'] = sanitize_title_for_query( $q['name'] );
|
||||||
$where .= " AND $wpdb->posts.post_name = '" . $q['name'] . "'";
|
$where .= " AND $wpdb->posts.post_name = '" . $q['name'] . "'";
|
||||||
} elseif ( '' != $q['pagename'] ) {
|
} elseif ( '' != $q['pagename'] ) {
|
||||||
|
|
Loading…
Reference in New Issue