Last active
April 28, 2023 08:34
-
-
Save mattiasghodsian/5f2629229b19a4a6fb484dc2af88abb6 to your computer and use it in GitHub Desktop.
[Wordpress] SVG 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
/** | |
* Title: SVG upload | |
* Author: Mattias Ghodsian | |
* Donate a cup of coffee: https://www.buymeacoffee.com/mattiasghodsian | |
* Donate Eth: 0xBBB96204E45D11C9799c6B12E6eE6F0d4A071Ef5 | |
**/ | |
add_filter( 'upload_mimes', 'cc_mime_types' ); | |
function cc_mime_types( $mimes ) { | |
$mimes['svg'] = 'image/svg+xml'; | |
return $mimes; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment