Created
September 20, 2024 08:03
-
-
Save KaineLabs/587509de71ed4e3b6d26fcfe1d0e004d to your computer and use it in GitHub Desktop.
Storio - Extend Stories Plugin Upload Extensions
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
<?php | |
// Storio - Extend Stories Plugin Upload Extensions | |
add_filter('upload_mimes', 'storio_custom_upload_mimes'); | |
function storio_custom_upload_mimes($mimes) { | |
$custom_mime_types = array( | |
'json' => 'application/json', | |
'xml' => 'application/xml', | |
'txt' => 'text/plain', | |
'avif' => 'image/avif', | |
'gif' => 'image/gif', | |
'jpg' => 'image/jpeg', | |
'png' => 'image/png', | |
'webp' => 'image/webp', | |
'svg' => 'image/svg+xml', | |
'pdf' => 'application/pdf', | |
'docx' => 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', | |
); | |
return array_merge($mimes, $custom_mime_types); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment