function my_mime_types($mime_types){
//Creating a new array will reset the allowed filetypes
$mime_types = array(
'jpg|jpeg|jpe' => 'image/jpeg',
'gif' => 'image/gif',
'png' => 'image/png',
'bmp' => 'image/bmp',
'tif|tiff' => 'image/tiff',
);
return $mime_types;
}
add_filter('upload_mimes', 'my_mime_types', 1, 1);
via. Adding & Removing Allowed FileTypes To WordPress Media Library | NetWebLogic
コメントを残す