@@ 1148-1152 (lines=5) @@ | ||
1145 | ||
1146 | $slug_count = count( $existing_term_slugs ); |
|
1147 | ||
1148 | if ( $slug_count > 1 ) { |
|
1149 | $remove_url = add_query_arg( $tax_query_var, urlencode( implode( '+', array_diff( $existing_term_slugs, array( $item['key'] ) ) ) ) ); |
|
1150 | } else { |
|
1151 | $remove_url = remove_query_arg( $tax_query_var ); |
|
1152 | } |
|
1153 | } |
|
1154 | ||
1155 | break; |
|
@@ 1183-1187 (lines=5) @@ | ||
1180 | $post_type_count = count( $post_types ); |
|
1181 | ||
1182 | // 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 |
|
1183 | if ( $post_type_count > 1 ) { |
|
1184 | $remove_url = add_query_arg( 'post_type', urlencode_deep( array_diff( $post_types, array( $item['key'] ) ) ) ); |
|
1185 | } else { |
|
1186 | $remove_url = remove_query_arg( 'post_type' ); |
|
1187 | } |
|
1188 | } |
|
1189 | ||
1190 | break; |