Code Duplication    Length = 14-14 lines in 2 locations

wp-includes/media.php 2 locations

@@ 2270-2283 (lines=14) @@
2267
		}
2268
	}
2269
2270
	if ( ! $primary ) {
2271
		$audios = get_attached_media( 'audio', $post_id );
2272
		if ( empty( $audios ) ) {
2273
			return;
2274
		}
2275
2276
		$audio = reset( $audios );
2277
		$atts['src'] = wp_get_attachment_url( $audio->ID );
2278
		if ( empty( $atts['src'] ) ) {
2279
			return;
2280
		}
2281
2282
		array_unshift( $default_types, 'src' );
2283
	}
2284
2285
	/**
2286
	 * Filters the media library used for the audio shortcode.
@@ 2507-2520 (lines=14) @@
2504
		}
2505
	}
2506
2507
	if ( ! $primary ) {
2508
		$videos = get_attached_media( 'video', $post_id );
2509
		if ( empty( $videos ) ) {
2510
			return;
2511
		}
2512
2513
		$video = reset( $videos );
2514
		$atts['src'] = wp_get_attachment_url( $video->ID );
2515
		if ( empty( $atts['src'] ) ) {
2516
			return;
2517
		}
2518
2519
		array_unshift( $default_types, 'src' );
2520
	}
2521
2522
	/**
2523
	 * Filters the media library used for the video shortcode.