WordPress at a glance
function is not described

wp_underscore_audio_template() WP 3.9.0

Output the markup for a audio tag to be used in an Underscore template when data.model is passed.

No Hooks.

Return

Nothing (null).

Usage

wp_underscore_audio_template();

Code of wp underscore audio template: wp-includes/media-template.php VER 5.0.3

<?php
function wp_underscore_audio_template() {
	$audio_types = wp_get_audio_extensions();
?>
<audio style="visibility: hidden"
	controls
	class="wp-audio-shortcode"
	width="{{ _.isUndefined( data.model.width ) ? 400 : data.model.width }}"
	preload="{{ _.isUndefined( data.model.preload ) ? 'none' : data.model.preload }}"
	<#
	<?php foreach ( array( 'autoplay', 'loop' ) as $attr ):
	?>if ( ! _.isUndefined( data.model.<?php echo $attr ?> ) && data.model.<?php echo $attr ?> ) {
		#> <?php echo $attr ?><#
	}
	<?php endforeach ?>#>
>
	<# if ( ! _.isEmpty( data.model.src ) ) { #>
	<source src="{{ data.model.src }}" type="{{ wp.media.view.settings.embedMimes[ data.model.src.split('.').pop() ] }}" />
	<# } #>

	<?php foreach ( $audio_types as $type ):
	?><# if ( ! _.isEmpty( data.model.<?php echo $type ?> ) ) { #>
	<source src="{{ data.model.<?php echo $type ?> }}" type="{{ wp.media.view.settings.embedMimes[ '<?php echo $type ?>' ] }}" />
	<# } #>
	<?php endforeach;
?></audio>
<?php
}