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.
Built from https://develop.svn.wordpress.org/trunk@33724


git-svn-id: http://core.svn.wordpress.org/trunk@33691 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Boone Gorges 2015-08-24 21:22:26 +00:00
parent 21c61251a2
commit 8a95b13cab
2 changed files with 11 additions and 1 deletions

View File

@ -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 ) {

View File

@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.4-alpha-33723';
$wp_version = '4.4-alpha-33724';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.