Forked from nathaningram/gist:035b4c6b25738c9805d14495b80ce907
Created
January 23, 2018 20:36
-
-
Save andresglx/16a8d1950e25e21bb46da33f027a7313 to your computer and use it in GitHub Desktop.
Adding SVG Format to Allowed WordPress File Types
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
//Adding SVG Format to Allowed WordPress File Types | |
function add_file_types_to_uploads($file_types){ | |
$new_filetypes = array(); | |
$new_filetypes['svg'] = 'image/svg+xml'; | |
$file_types = array_merge($file_types, $new_filetypes ); | |
return $file_types; | |
} | |
add_action('upload_mimes', 'add_file_types_to_uploads'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment