📅  最后修改于: 2022-03-11 14:58:42.294000             🧑  作者: Mango
function dmc_add_svg_mime_types($mimes) {
if ( current_user_can('administrator') ){
$mimes['svg'] = 'image/svg+xml';
}
return $mimes;
}
add_filter('upload_mimes', 'dmc_add_svg_mime_types');