Code Duplication    Length = 12-12 lines in 2 locations

wp-includes/bookmark.php 2 locations

@@ 179-190 (lines=12) @@
176
	}
177
178
	$exclusions = '';
179
	if ( ! empty( $r['exclude'] ) ) {
180
		$exlinks = preg_split( '/[\s,]+/', $r['exclude'] );
181
		if ( count( $exlinks ) ) {
182
			foreach ( $exlinks as $exlink ) {
183
				if ( empty( $exclusions ) ) {
184
					$exclusions = ' AND ( link_id <> ' . intval( $exlink ) . ' ';
185
				} else {
186
					$exclusions .= ' AND link_id <> ' . intval( $exlink ) . ' ';
187
				}
188
			}
189
		}
190
	}
191
	if ( ! empty( $exclusions ) ) {
192
		$exclusions .= ')';
193
	}
@@ 214-225 (lines=12) @@
211
212
	$category_query = '';
213
	$join = '';
214
	if ( ! empty( $r['category'] ) ) {
215
		$incategories = preg_split( '/[\s,]+/', $r['category'] );
216
		if ( count($incategories) ) {
217
			foreach ( $incategories as $incat ) {
218
				if ( empty( $category_query ) ) {
219
					$category_query = ' AND ( tt.term_id = ' . intval( $incat ) . ' ';
220
				} else {
221
					$category_query .= ' OR tt.term_id = ' . intval( $incat ) . ' ';
222
				}
223
			}
224
		}
225
	}
226
	if ( ! empty( $category_query ) ) {
227
		$category_query .= ") AND taxonomy = 'link_category'";
228
		$join = " INNER JOIN $wpdb->term_relationships AS tr ON ($wpdb->links.link_id = tr.object_id) INNER JOIN $wpdb->term_taxonomy as tt ON tt.term_taxonomy_id = tr.term_taxonomy_id";