21 lines
531 B
PHP
21 lines
531 B
PHP
<?php
|
|
|
|
/**
|
|
* Add mimetypes support: svg
|
|
*
|
|
* This class defines all code necessary to run during the plugin's activation.
|
|
*
|
|
* @link https://xarxaprod.cat
|
|
* @since 1.0.0
|
|
* @package xarxaprod-wp-plugin
|
|
* @subpackage xarxaprod-wp-plugin/includes
|
|
* @author Jorge - vitrubio.net <jorge@vitrubio.net>
|
|
*/
|
|
if (! function_exists ('enable_mime_types') ){
|
|
function enable_mime_types( $mimes ) {
|
|
$mimes['svg'] = 'image/svg+xml';
|
|
return $mimes;
|
|
}
|
|
add_filter('upload_mimes', 'enable_mime_types');
|
|
}
|