@@ 1528-1535 (lines=8) @@ | ||
1525 | ||
1526 | $slug_count = count( $existing_term_slugs ); |
|
1527 | ||
1528 | if ( $slug_count > 1 ) { |
|
1529 | $remove_url = Jetpack_Search_Helpers::add_query_arg( |
|
1530 | $tax_query_var, |
|
1531 | rawurlencode( implode( '+', array_diff( $existing_term_slugs, array( $item['key'] ) ) ) ) |
|
1532 | ); |
|
1533 | } else { |
|
1534 | $remove_url = Jetpack_Search_Helpers::remove_query_arg( $tax_query_var ); |
|
1535 | } |
|
1536 | } |
|
1537 | ||
1538 | break; |
|
@@ 1566-1573 (lines=8) @@ | ||
1563 | $post_type_count = count( $post_types ); |
|
1564 | ||
1565 | // 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 |
|
1566 | if ( $post_type_count > 1 ) { |
|
1567 | $remove_url = Jetpack_Search_Helpers::add_query_arg( |
|
1568 | 'post_type', |
|
1569 | rawurlencode( implode( ',', array_diff( $post_types, array( $item['key'] ) ) ) ) |
|
1570 | ); |
|
1571 | } else { |
|
1572 | $remove_url = Jetpack_Search_Helpers::remove_query_arg( 'post_type' ); |
|
1573 | } |
|
1574 | } |
|
1575 | ||
1576 | break; |