@@ 1462-1469 (lines=8) @@ | ||
1459 | ||
1460 | $slug_count = count( $existing_term_slugs ); |
|
1461 | ||
1462 | if ( $slug_count > 1 ) { |
|
1463 | $remove_url = Jetpack_Search_Helpers::add_query_arg( |
|
1464 | $tax_query_var, |
|
1465 | rawurlencode( implode( '+', array_diff( $existing_term_slugs, array( $item['key'] ) ) ) ) |
|
1466 | ); |
|
1467 | } else { |
|
1468 | $remove_url = Jetpack_Search_Helpers::remove_query_arg( $tax_query_var ); |
|
1469 | } |
|
1470 | } |
|
1471 | ||
1472 | break; |
|
@@ 1500-1507 (lines=8) @@ | ||
1497 | $post_type_count = count( $post_types ); |
|
1498 | ||
1499 | // 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 |
|
1500 | if ( $post_type_count > 1 ) { |
|
1501 | $remove_url = Jetpack_Search_Helpers::add_query_arg( |
|
1502 | 'post_type', |
|
1503 | rawurlencode( implode( ',', array_diff( $post_types, array( $item['key'] ) ) ) ) |
|
1504 | ); |
|
1505 | } else { |
|
1506 | $remove_url = Jetpack_Search_Helpers::remove_query_arg( 'post_type' ); |
|
1507 | } |
|
1508 | } |
|
1509 | ||
1510 | break; |