oficinasuport-wp-plugin/includes/enable-svg.php

20 lines
490 B
PHP
Raw Normal View History

2022-11-30 11:39:22 +01:00
<?php
/**
* Add mimetypes support: svg
*
* This class defines all code necessary to run during the plugin's activation.
*
* @link https://oficinasuport.xarxaprod.cat
* @since 1.0.0
* @package ofisuport-wp-plugin
* @subpackage ofisuport-wp-plugin/includes
* @author Jorge - vitrubio.net <jorge@vitrubio.net>
*/
function enable_mime_types( $mimes ) {
$mimes['svg'] = 'image/svg+xml';
return $mimes;
}
add_filter('upload_mimes', 'enable_mime_types');