Skip to content

Instantly share code, notes, and snippets.

@stevenkword
Created October 20, 2015 22:06
Show Gist options
  • Save stevenkword/b7b1caaec6f43a06e3df to your computer and use it in GitHub Desktop.
Save stevenkword/b7b1caaec6f43a06e3df to your computer and use it in GitHub Desktop.
// Place this in functions.php of your theme
function example_mime_types($mimes) {
if( ! current_user_can( 'administrator' ) ) {
return $mimes;
$mimes['svg'] = 'image/svg+xml';
return $mimes;
}
add_filter('upload_mimes', 'example_mime_types');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment