Created
July 12, 2014 16:08
-
-
Save acolson/8bd97b7faf7725c44989 to your computer and use it in GitHub Desktop.
Allow WordPress to upload MP4, WebM and OGG video
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
add_filter( 'mime_types', 'aco_extend_mime_types' ); | |
function aco_extend_mime_types( $existing_mimes ) { | |
// Add webm, mp4 and OGG to the list of mime types | |
$existing_mimes['webm'] = 'video/webm'; | |
$existing_mimes['mp4'] = 'video/mp4'; | |
$existing_mimes['ogg'] = 'video/ogg'; | |
// Return an array now including our added mime types | |
return $existing_mimes; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment