add_filter('upload_mimes','custom_upload_mimes'); function custom_upload_mimes($mime_types=array()){ $mime_types = array( 'jpg|jpeg|jpe' => 'image/jpeg', 'png' => 'image/png', 'mp4' => 'video/mp4', 'flv' => 'video/x-flv' ); return $mime_types; }
To ensure that just about anything isn't uploaded from the admin, you can configure the authorized MIME types as follows: