Skip to content

Instantly share code, notes, and snippets.

@valeriu
Last active December 4, 2017 14:34
Show Gist options
  • Save valeriu/7c454cf9f9ef970082a272984e150e20 to your computer and use it in GitHub Desktop.
Save valeriu/7c454cf9f9ef970082a272984e150e20 to your computer and use it in GitHub Desktop.
<?php
/* -------------------------------------------------------------
* Custom Logo add this in "after_setup_theme" hook
* ============================================================*/
add_theme_support( 'custom-logo' );
/* -------------------------------------------------------------
* Enable svg support
* ============================================================*/
if ( ! function_exists( 'avatar_add_svg_mime_types' ) ) {
/**
* @param $mimes - MIME file type
* @return mixed
*/
function avatar_add_svg_mime_types( $mimes ) {
if ( is_super_admin() ) {
$mimes['svg'] = 'image/svg+xml';
}
return $mimes;
}
add_filter( 'upload_mimes', 'avatar_add_svg_mime_types' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment