mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-05 21:24:35 +00:00
In WP_Query::parse_tax_query(), allow 'cat' and 'tag' querystrings to be formatted as arrays.
See [33095] #32454 for a previous fix related to custom taxonomies. Props Veraxus. Fixes #33532. git-svn-id: https://develop.svn.wordpress.org/trunk@33724 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1891,6 +1891,11 @@ class WP_Query {
|
||||
}
|
||||
}
|
||||
|
||||
// If querystring 'cat' is an array, implode it.
|
||||
if ( is_array( $q['cat'] ) ) {
|
||||
$q['cat'] = implode( ',', $q['cat'] );
|
||||
}
|
||||
|
||||
// Category stuff
|
||||
if ( ! empty( $q['cat'] ) && ! $this->is_singular ) {
|
||||
$cat_in = $cat_not_in = array();
|
||||
@@ -1966,6 +1971,11 @@ class WP_Query {
|
||||
);
|
||||
}
|
||||
|
||||
// If querystring 'tag' is array, implode it.
|
||||
if ( is_array( $q['tag'] ) ) {
|
||||
$q['tag'] = implode( ',', $q['tag'] );
|
||||
}
|
||||
|
||||
// Tag stuff
|
||||
if ( '' != $q['tag'] && !$this->is_singular && $this->query_vars_changed ) {
|
||||
if ( strpos($q['tag'], ',') !== false ) {
|
||||
|
||||
Reference in New Issue
Block a user