Skip to content

Commit 4480378

Browse files
author
Marcel Moll
committed
Create add_additional_mime_types_to_media_libary.php
1 parent ef194a7 commit 4480378

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
function add_custom_mime_types($mimes){
2+
$new_file_types = array (
3+
'zip' => 'application/zip',
4+
'pdf' => 'application/pdf',
5+
'epub' => 'application/epub+zip',
6+
//add more here
7+
);
8+
9+
return array_merge($mimes,$new_file_types);
10+
}
11+
12+
add_filter('upload_mimes','add_custom_mime_types');

0 commit comments

Comments
 (0)