wp_get_audio_extensions() WordPress Function

The wp_get_audio_extensions() function retrieves a list of supported audio file extensions. This function can be used by plugins and themes to determine which audio files can be used on a site.

wp_get_audio_extensions() #

Returns a filtered list of supported audio formats.


Return

(string[]) Supported audio formats.


Top ↑

Source

File: wp-includes/media.php

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' ) );
}


Top ↑

Changelog

Changelog
VersionDescription
3.6.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More