Skip to content

Instantly share code, notes, and snippets.

@dustinleer
Last active August 3, 2020 17:05
Show Gist options
  • Save dustinleer/2589c5a598907151ad79b0e12a6e9d37 to your computer and use it in GitHub Desktop.
Save dustinleer/2589c5a598907151ad79b0e12a6e9d37 to your computer and use it in GitHub Desktop.
Add function for SVG mime type
<?php
/*add SVG functionality*/
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