On this page
wp_get_audio_extensions(): string[]
Returns a filtered list of supported audio formats.
Return
string[] Supported audio formats.
Source
File: wp-includes/media.php. View all references
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' ) );
}
Hooks
- apply_filters( 'wp_audio_extensions',
string[] $extensions ) -
Filters the list of supported audio formats.
Related
Uses
| Uses | Description |
|---|---|
| apply_filters() wp-includes/plugin.php | Calls the callback functions that have been added to a filter hook. |
Used By
| Used By | Description |
|---|---|
| populate_network_meta() wp-admin/includes/schema.php | Creates WordPress network meta and sets the default values. |
| WP_Widget_Media_Audio::get_instance_schema() wp-includes/widgets/class-wp-widget-media-audio.php | Get schema for properties of a widget instance (item). |
| wp_attachment_is() wp-includes/post.php | Verifies an attachment is of a given type. |
| wp_enqueue_media() wp-includes/media.php | Enqueues all scripts, styles, settings, and templates necessary to use all media JS APIs. |
| wp_maybe_load_embeds() wp-includes/embed.php | Determines if default embed handlers should be loaded. |
| wp_audio_shortcode() wp-includes/media.php | Builds the Audio shortcode output. |
| wp_underscore_audio_template() wp-includes/media-template.php | Outputs the markup for a audio tag to be used in an Underscore template when data.model is passed. |
| wp_print_media_templates() wp-includes/media-template.php | Prints the templates used in the media manager. |
Changelog
| Version | Description |
|---|---|
| 3.6.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_get_audio_extensions