Created
March 16, 2018 12:42
-
-
Save Garconis/fede2d8bb5ef698596edc038c139951e to your computer and use it in GitHub Desktop.
WordPress | Allow SVG through WordPress Media Uploader
This file contains hidden or 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 | |
// Allow SVG through WordPress Media Uploader | |
function cc_mime_types($mimes) { | |
$mimes['svg'] = 'image/svg+xml'; | |
return $mimes; | |
} | |
add_filter('upload_mimes', 'cc_mime_types'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment