WordPress.org

Ready to get started?Download WordPress

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/wp get audio extensions

Contents

Description

Return a filtered list of WP-supported audio formats. (This function is called by wp_audio_shortcode() and wp_maybe_load_embeds(), and creates filter wp_audio_extensions.)

Default WordPress supported audio formats are: mp3, ogg, wma, m4a, wav.

Usage

 <?php wp_get_audio_extensions() ?> 

Parameters

This tag has no parameters.

Return

(array) 
Description.

Example

Print an array of default WordPress-supported audio extensions:

$audio_extensions = wp_get_audio_extensions();

Displays as:

Array
(
    [0] => mp3
    [1] => ogg
    [2] => wma
    [3] => m4a
    [4] => wav
)

Change Log

Source File

wp_get_audio_extensions() is located in wp-includes/media.php..

Related

Embeds: wp_oembed_add_provider(), wp_oembed_remove_provider(), wp_oembed_get(), wp_embed_defaults(), wp_embed_register_handler(), wp_embed_unregister_handler(), get_embedded_audio(), get_embedded_media(), get_embedded_video(), wp_embed_handler_audio(), wp_embed_handler_video()

Shortcode API

Audio: wp_audio_shortcode(), wp_get_audio_extensions(), get_attached_audio(), get_attached_media(), get_embedded_audio(), get_embedded_media(), wp_embed_handler_audio(), wp_mediaelement_fallback(), wp_read_audio_metadata(), wp_add_id3_tag_data(), the_post_format_audio(), get_the_post_format_media(), get_content_audio(), get_content_media()

See also index of Function Reference and index of Template Tags.