Created
April 6, 2016 21:52
-
-
Save robwent/e3bf00bafe7a00bc3d0c4dceabde4fca to your computer and use it in GitHub Desktop.
Add custom mime types to Wordpress
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
//The following goes in a themes functions file or a custom hooks plugin | |
function custom_upload_mimes ( $existing_mimes ) { | |
$existing_mimes['epub'] = 'application/epub+zip'; | |
$existing_mimes['mobi'] = 'application/x-mobipocket-ebook'; | |
return $existing_mimes; | |
} | |
add_filter('upload_mimes', 'custom_upload_mimes'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment