[wp-trac] [WordPress Trac] #57300: parse_tax_query() does not handle array query param when taxonomy has rewrite set to hierarchical
WordPress Trac
noreply at wordpress.org
Fri Dec 9 06:33:13 UTC 2022
#57300: parse_tax_query() does not handle array query param when taxonomy has
rewrite set to hierarchical
---------------------------+------------------------------
Reporter: chamois_blanc | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Taxonomy | Version: 6.1.1
Severity: major | Resolution:
Keywords: | Focuses:
---------------------------+------------------------------
Comment (by chamois_blanc):
I think the code should look like this instead:
{{{#!php
<?php
$term = $q[ $t->query_var ];
if ( is_array( $term ) ) {
$term = implode( ',', $term );
}
if ( ! empty( $t->rewrite['hierarchical'] ) ) {
$term = wp_basename( $term );
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/57300#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list