Created
June 12, 2012 19:08
-
-
Save ekka21/2919479 to your computer and use it in GitHub Desktop.
Wordpress: Add/Remove MineType
This file contains hidden or 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
//Add mineType | |
add_filter('upload_mimes','add_custom_mime_types'); | |
function add_custom_mime_types($mimes){ | |
return array_merge($mimes,array ( | |
'ac3' => 'audio/ac3', | |
'mpa' => 'audio/MPA', | |
'flv' => 'video/x-flv' | |
)); | |
} | |
//Remove mineType | |
add_filter('upload_mimes','remove_mime_types'); | |
function remove_mime_types($mimes){ | |
unset( $existing_mimes['mp4'] ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment