Code Duplication    Length = 5-5 lines in 2 locations

modules/search/class.jetpack-search.php 2 locations

@@ 1059-1063 (lines=5) @@
1056
1057
							$slug_count = count( $existing_term_slugs );
1058
1059
							if ( $slug_count > 1 ) {
1060
								$remove_url = add_query_arg( $tax_query_var, urlencode( implode( '+', array_diff( $existing_term_slugs, array( $item['key'] ) ) ) ) );
1061
							} else {
1062
								$remove_url = remove_query_arg( $tax_query_var );
1063
							}
1064
						}
1065
1066
						break;
@@ 1094-1098 (lines=5) @@
1091
							$post_type_count = count( $post_types );
1092
1093
							// 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
1094
							if ( $post_type_count > 1 ) {
1095
								$remove_url = add_query_arg( 'post_type', urlencode_deep( array_diff( $post_types, array( $item['key'] ) ) ) );
1096
							} else {
1097
								$remove_url = remove_query_arg( 'post_type' );
1098
							}
1099
						}
1100
1101
						break;