Ticket #16627: 16627.diff
File 16627.diff, 1.1 KB (added by , 14 years ago) |
---|
-
wp-includes/canonical.php
164 164 $redirect['query'] = remove_query_arg( array( 'term', 'taxonomy'), $redirect['query']); 165 165 } 166 166 } 167 168 $tax_obj = get_taxonomy( $obj->taxonomy ); 169 $tax_query_vars = array_diff( array_keys( $wp_query->query ), array_keys( $_GET ), array( 'taxonomy', 'term', $tax_obj->query_var ) ); 170 167 171 $tax_url = parse_url($tax_url); 168 if ( ! empty($tax_url['query']) ) { // Custom taxonomies may only be accessable via ?taxonomy=..&term=.. 172 if ( ! empty($tax_query_vars) ) { 173 //The request was for a custom permalink, so we have nothing to add here. 174 } elseif ( ! empty($tax_url['query']) ) { // Custom taxonomies may only be accessable via ?taxonomy=..&term=.. 169 175 parse_str($tax_url['query'], $query_vars); 170 176 $redirect['query'] = add_query_arg($query_vars, $redirect['query']); 171 177 } else { // Taxonomy is accessable via a "pretty-URL"