Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Disable m4a and m4b type in wordpress upload
<?php
/**
* Modify mime types
* @param array $mime_types Mime types
*/
public function modify_mime_type($mime_types){
// Unset m4a type
unset( $mime_types['mp3|m4a|m4b'] );
// Added mp3 type
$mime_types['mp3'] = 'audio/mp3';
return $mime_types;
}
add_filter( 'upload_mimes', 'modify_mime_type' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.