Created
May 25, 2022 14:14
-
-
Save runezero/53bacf78bd5823dc2b9598108a225054 to your computer and use it in GitHub Desktop.
[Allow file type upload] Allow new file type uploads in the media library, multisites excluded #wordpress
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
| add_filter( 'upload_mimes', 'allow_upload_new_mimes' ); | |
| function allow_upload_new_mimes( $mimes = array() ) { | |
| $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