Skip to content

Instantly share code, notes, and snippets.

@tuannguyenminh2086
Created June 27, 2019 07:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tuannguyenminh2086/d5fe9176220076476ef2ba28d7fa7e9f to your computer and use it in GitHub Desktop.
Save tuannguyenminh2086/d5fe9176220076476ef2ba28d7fa7e9f to your computer and use it in GitHub Desktop.
/** wp-config.php**/
define('ALLOW_UNFILTERED_UPLOADS', true);
/** functions.php **/
function my_custom_mime_types( $mimes ) {
// New allowed mime types.
$mimes['svg'] = 'image/svg+xml';
$mimes['svgz'] = 'image/svg+xml';
// Optional. Remove a mime type.
unset( $mimes['exe'] );
return $mimes;
}
add_filter( 'upload_mimes', 'my_custom_mime_types' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment