📜  允许在 Wordpress 中上传 json - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:13.676000             🧑  作者: Mango

代码示例1
function cc_mime_types($mimes) {
$mimes['json'] = 'application/json'; 
$mimes['svg'] = 'image/svg+xml'; 
return $mimes; 
} 

add_filter('upload_mimes', 'cc_mime_types');