|
@@ 1164-1168 (lines=5) @@
|
| 1161 |
|
|
| 1162 |
|
$slug_count = count( $existing_term_slugs ); |
| 1163 |
|
|
| 1164 |
|
if ( $slug_count > 1 ) { |
| 1165 |
|
$remove_url = add_query_arg( $tax_query_var, urlencode( implode( '+', array_diff( $existing_term_slugs, array( $item['key'] ) ) ) ) ); |
| 1166 |
|
} else { |
| 1167 |
|
$remove_url = remove_query_arg( $tax_query_var ); |
| 1168 |
|
} |
| 1169 |
|
} |
| 1170 |
|
|
| 1171 |
|
break; |
|
@@ 1199-1203 (lines=5) @@
|
| 1196 |
|
$post_type_count = count( $post_types ); |
| 1197 |
|
|
| 1198 |
|
// For the right 'remove filter' url, we need to remove the post type from the array, or remove the param entirely if it's the only one |
| 1199 |
|
if ( $post_type_count > 1 ) { |
| 1200 |
|
$remove_url = add_query_arg( 'post_type', urlencode_deep( array_diff( $post_types, array( $item['key'] ) ) ) ); |
| 1201 |
|
} else { |
| 1202 |
|
$remove_url = remove_query_arg( 'post_type' ); |
| 1203 |
|
} |
| 1204 |
|
} |
| 1205 |
|
|
| 1206 |
|
break; |