wp_get_audio_extensions

Returns a filtered list of WP-supported audio formats.

Description

(array) wp_get_audio_extensions(); 

Returns (array)

Supported audio formats.


Usage

  1. if ( !function_exists( 'wp_get_audio_extensions' ) ) { 
  2. require_once ABSPATH . WPINC . '/media.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = wp_get_audio_extensions(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/media.php  
  1. function wp_get_audio_extensions() { 
  2. /** 
  3. * Filters the list of supported audio formats. 
  4. * @since 3.6.0 
  5. * @param array $extensions An array of support audio formats. Defaults are 
  6. * 'mp3', 'ogg', 'wma', 'm4a', 'wav'. 
  7. */ 
  8. return apply_filters( 'wp_audio_extensions', array( 'mp3', 'ogg', 'wma', 'm4a', 'wav' ) );