ing Fallback HTML. */ function wp_mediaelement_fallback( $url ) { /** * Filters the Mediaelement fallback output for no-JS. * * @since 3.6.0 * * @param string $output Fallback output for no-JS. * @param string $url Media file URL. */ return apply_filters( 'wp_mediaelement_fallback', sprintf( '%1$s', esc_url( $url ) ), $url ); } /** * Returns a filtered list of supported audio formats. * * @since 3.6.0 * * @return string[] Supported audio formats. */ function wp_get_audio_extensions() { /** * Filters the list of supported audio formats. * * @since 3.6.0 * * @param string[] $extensions An array of supported audio formats. Defaults are * 'mp3', 'ogg', 'flac', 'm4a', 'wav'. */ return apply_filters( 'wp_audio_extensions', array( 'mp3', 'ogg', 'flac', 'm4a', 'wav' ) ); } /** * Returns useful keys to use to lookup data from an attachment's stored metadata. * * @since 3.9.0 * * @param WP_Post $attachment The current attachment, provided for context. * @param string $context Optional. The context. Accepts 'edit', 'display'. Default 'display'. * @return string[] Key/value pairs of field keys to labels. */ function wp_get_attachment_id3_keys( $attachment, $context = 'display' ) { $fields = array( 'artist' => __( 'Artist' ), 'album' => __( 'Album' ), ); if ( 'display' === $context ) { $fields['genre'] = __( 'Genre' ); $fields['year'] = __( 'Year' ); $fields['length_formatted'] = _x( 'Length', 'video or audio' ); } elseif ( 'js' === $context ) { $fields['bitrate'] = __( 'Bitrate' ); $fields['bitrate_mode'] = __( 'Bitrate Mode' ); } /** * Filters the editable list of keys to look up data from an attachment's metadata. * * @since 3.9.0 * * @param array $fields Key/value pairs of field keys to labels. * @param WP_Post $attachment Attachment object. * @param string $context The context. Accepts 'edit', 'display'. Default 'display'. */ return apply_filters( 'wp_get_attachment_id3_keys', $fields, $attachment, $context ); } /** * Builds the Audio shortcode output. * * This implements the functionality of the Audio Shortcode for displaying * WordPress mp3s in a post. * * @since 3.6.0 * * @param array $attr { * Attributes of the audio shortcode. * * @type string $src URL to the source of the audio file. Default empty. * @type string $loop The 'loop' attribute for the `