Make WordPress Core


Ignore:
Timestamp:
08/24/2015 09:21:49 PM (11 years ago)
Author:
boonebgorges
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/query.php

    r33722 r33724  
    18921892                }
    18931893
     1894                // If querystring 'cat' is an array, implode it.
     1895                if ( is_array( $q['cat'] ) ) {
     1896                        $q['cat'] = implode( ',', $q['cat'] );
     1897                }
     1898
    18941899                // Category stuff
    18951900                if ( ! empty( $q['cat'] ) && ! $this->is_singular ) {
    … …  
    19651970                                'include_children' => false
    19661971                        );
     1972                }
     1973
     1974                // If querystring 'tag' is array, implode it.
     1975                if ( is_array( $q['tag'] ) ) {
     1976                        $q['tag'] = implode( ',', $q['tag'] );
    19671977                }
    19681978
Note: See TracChangeset for help on using the changeset viewer.