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

21 lines
531 B
PHP
Raw Permalink Normal View History

2024-01-09 16:22:35 +01:00
<?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');
2024-01-09 16:22:35 +01:00
}