Code Duplication    Length = 8-8 lines in 2 locations

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

@@ 1480-1487 (lines=8) @@
1477
1478
							$slug_count = count( $existing_term_slugs );
1479
1480
							if ( $slug_count > 1 ) {
1481
								$remove_url = Jetpack_Search_Helpers::add_query_arg(
1482
									$tax_query_var,
1483
									rawurlencode( implode( '+', array_diff( $existing_term_slugs, array( $item['key'] ) ) ) )
1484
								);
1485
							} else {
1486
								$remove_url = Jetpack_Search_Helpers::remove_query_arg( $tax_query_var );
1487
							}
1488
						}
1489
1490
						break;
@@ 1518-1525 (lines=8) @@
1515
							$post_type_count = count( $post_types );
1516
1517
							// 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
1518
							if ( $post_type_count > 1 ) {
1519
								$remove_url = Jetpack_Search_Helpers::add_query_arg(
1520
									'post_type',
1521
									rawurlencode( implode( ',', array_diff( $post_types, array( $item['key'] ) ) ) )
1522
								);
1523
							} else {
1524
								$remove_url = Jetpack_Search_Helpers::remove_query_arg( 'post_type' );
1525
							}
1526
						}
1527
1528
						break;