Last active
September 1, 2015 20:44
-
-
Save zanetaylor/3fc8dadf08b7a2ae1bc0 to your computer and use it in GitHub Desktop.
Enable SVG uploads in WordPress
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
add_filter('upload_mimes', 'custom_upload_mimes'); | |
function custom_upload_mimes ( $existing_mimes=array() ) { | |
// add the file extension to the array | |
$existing_mimes['svg'] = 'mime/type'; | |
// call the modified list of extensions | |
return $existing_mimes; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment