@@ 1102-1106 (lines=5) @@ | ||
1099 | ||
1100 | $slug_count = count( $existing_term_slugs ); |
|
1101 | ||
1102 | if ( $slug_count > 1 ) { |
|
1103 | $remove_url = add_query_arg( $tax_query_var, urlencode( implode( '+', array_diff( $existing_term_slugs, array( $item['key'] ) ) ) ) ); |
|
1104 | } else { |
|
1105 | $remove_url = remove_query_arg( $tax_query_var ); |
|
1106 | } |
|
1107 | } |
|
1108 | ||
1109 | break; |
|
@@ 1137-1141 (lines=5) @@ | ||
1134 | $post_type_count = count( $post_types ); |
|
1135 | ||
1136 | // 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 |
|
1137 | if ( $post_type_count > 1 ) { |
|
1138 | $remove_url = add_query_arg( 'post_type', urlencode_deep( array_diff( $post_types, array( $item['key'] ) ) ) ); |
|
1139 | } else { |
|
1140 | $remove_url = remove_query_arg( 'post_type' ); |
|
1141 | } |
|
1142 | } |
|
1143 | ||
1144 | break; |