'audio/wav'` * * @since 6.8.0 * * @param string[] $mime_types Mime types. * @return string[] Mime types keyed by the file extension regex corresponding to those types. */ function gutenberg_get_mime_types_6_8( $mime_types ) { /* * Only add support if there is existing support for 'wav'. * Some plugins may have deliberately disabled it. */ if ( ! isset( $mime_types['wav'] ) && ! isset( $mime_types['wav|x-wav'] ) ) { return $mime_types; } /* * Also, given that other themes or plugins may have already * tried to add x-wav type support, only * add the mime type if it doesn't already exist * to avoid overriding any customizations. */ if ( ! isset( $mime_types['x-wav'] ) && ! isset( $mime_types['wav|x-wav'] ) ) { $mime_types['x-wav'] = 'audio/wav'; } return $mime_types; } add_filter( 'mime_types', 'gutenberg_get_mime_types_6_8', 99 );