Created
November 13, 2016 09:03
-
-
Save mostafasoufi/2a69e6d12e246d8b97a1a1a2e2966702 to your computer and use it in GitHub Desktop.
Disable m4a and m4b type in wordpress upload
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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