Last active
March 23, 2019 15:42
-
-
Save techskilled/48bec2fcfc799b38d3a7b0a5f93735cd to your computer and use it in GitHub Desktop.
Wordpress Media Snippet - Media - Allow SVG Media Logo Upload
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
/** | |
* @snippet Wordpress Media Snippet - Media - Allow SVG Media Logo Upload | |
* @code https://techskilled.co.uk/snippets/wordpress-allow-svg-media-logo-upload-snippet | |
* @author https://techskilled.co.uk | |
*/ | |
function ts_mime_types($mimes) { | |
$mimes['svg'] = 'image/svg+xml'; | |
return $mimes; | |
} | |
add_filter('upload_mimes', 'ts_mime_types'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment