Code Duplication    Length = 3-3 lines in 2 locations

src/wp-includes/media.php 2 locations

@@ 2268-2270 (lines=3) @@
2265
	$primary = false;
2266
	if ( ! empty( $atts['src'] ) ) {
2267
		$type = wp_check_filetype( $atts['src'], wp_get_mime_types() );
2268
		if ( ! in_array( strtolower( $type['ext'] ), $default_types ) ) {
2269
			return sprintf( '<a class="wp-embedded-audio" href="%s">%s</a>', esc_url( $atts['src'] ), esc_html( $atts['src'] ) );
2270
		}
2271
		$primary = true;
2272
		array_unshift( $default_types, 'src' );
2273
	} else {
@@ 2499-2501 (lines=3) @@
2496
		$is_youtube = (  preg_match( $yt_pattern, $atts['src'] ) );
2497
		if ( ! $is_youtube && ! $is_vimeo ) {
2498
			$type = wp_check_filetype( $atts['src'], wp_get_mime_types() );
2499
			if ( ! in_array( strtolower( $type['ext'] ), $default_types ) ) {
2500
				return sprintf( '<a class="wp-embedded-video" href="%s">%s</a>', esc_url( $atts['src'] ), esc_html( $atts['src'] ) );
2501
			}
2502
		}
2503
2504
		if ( $is_vimeo ) {