Answers for "allow json uploads in Wordpress"

PHP
0

allow json uploads in Wordpress

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

add_filter('upload_mimes', 'cc_mime_types');
Posted by: Guest on August-27-2021

Browse Popular Code Answers by Language