Code Duplication    Length = 3-3 lines in 2 locations

wp-includes/media.php 2 locations

@@ 2254-2256 (lines=3) @@
2251
	$primary = false;
2252
	if ( ! empty( $atts['src'] ) ) {
2253
		$type = wp_check_filetype( $atts['src'], wp_get_mime_types() );
2254
		if ( ! in_array( strtolower( $type['ext'] ), $default_types ) ) {
2255
			return sprintf( '<a class="wp-embedded-audio" href="%s">%s</a>', esc_url( $atts['src'] ), esc_html( $atts['src'] ) );
2256
		}
2257
		$primary = true;
2258
		array_unshift( $default_types, 'src' );
2259
	} else {
@@ 2485-2487 (lines=3) @@
2482
		$is_youtube = (  preg_match( $yt_pattern, $atts['src'] ) );
2483
		if ( ! $is_youtube && ! $is_vimeo ) {
2484
			$type = wp_check_filetype( $atts['src'], wp_get_mime_types() );
2485
			if ( ! in_array( strtolower( $type['ext'] ), $default_types ) ) {
2486
				return sprintf( '<a class="wp-embedded-video" href="%s">%s</a>', esc_url( $atts['src'] ), esc_html( $atts['src'] ) );
2487
			}
2488
		}
2489
2490
		if ( $is_vimeo ) {