Code Duplication    Length = 7-8 lines in 4 locations

wp-includes/query.php 4 locations

@@ 2068-2074 (lines=7) @@
2065
			);
2066
		}
2067
2068
		if ( !empty($q['tag__in']) ) {
2069
			$q['tag__in'] = array_map('absint', array_unique( (array) $q['tag__in'] ) );
2070
			$tax_query[] = array(
2071
				'taxonomy' => 'post_tag',
2072
				'terms' => $q['tag__in']
2073
			);
2074
		}
2075
2076
		if ( !empty($q['tag__not_in']) ) {
2077
			$q['tag__not_in'] = array_map('absint', array_unique( (array) $q['tag__not_in'] ) );
@@ 2076-2083 (lines=8) @@
2073
			);
2074
		}
2075
2076
		if ( !empty($q['tag__not_in']) ) {
2077
			$q['tag__not_in'] = array_map('absint', array_unique( (array) $q['tag__not_in'] ) );
2078
			$tax_query[] = array(
2079
				'taxonomy' => 'post_tag',
2080
				'terms' => $q['tag__not_in'],
2081
				'operator' => 'NOT IN'
2082
			);
2083
		}
2084
2085
		if ( !empty($q['tag__and']) ) {
2086
			$q['tag__and'] = array_map('absint', array_unique( (array) $q['tag__and'] ) );
@@ 2085-2092 (lines=8) @@
2082
			);
2083
		}
2084
2085
		if ( !empty($q['tag__and']) ) {
2086
			$q['tag__and'] = array_map('absint', array_unique( (array) $q['tag__and'] ) );
2087
			$tax_query[] = array(
2088
				'taxonomy' => 'post_tag',
2089
				'terms' => $q['tag__and'],
2090
				'operator' => 'AND'
2091
			);
2092
		}
2093
2094
		if ( !empty($q['tag_slug__in']) ) {
2095
			$q['tag_slug__in'] = array_map('sanitize_title_for_query', array_unique( (array) $q['tag_slug__in'] ) );
@@ 2094-2101 (lines=8) @@
2091
			);
2092
		}
2093
2094
		if ( !empty($q['tag_slug__in']) ) {
2095
			$q['tag_slug__in'] = array_map('sanitize_title_for_query', array_unique( (array) $q['tag_slug__in'] ) );
2096
			$tax_query[] = array(
2097
				'taxonomy' => 'post_tag',
2098
				'terms' => $q['tag_slug__in'],
2099
				'field' => 'slug'
2100
			);
2101
		}
2102
2103
		if ( !empty($q['tag_slug__and']) ) {
2104
			$q['tag_slug__and'] = array_map('sanitize_title_for_query', array_unique( (array) $q['tag_slug__and'] ) );