<?php /** * Add mimetypes support: svg * * @link https://hangar.org * @since 1.0.0 * @package hangar-wp-plugin * @subpackage hangar-wp-plugin/includes */ /** * Add mimetypes support: svg * * This class defines all code necessary to run during the plugin's activation. * * @since 1.0.0 * @package hangar-wp-plugin * @subpackage hangar-wp-plugin/includes * @author Jorge - vitrubio.net <jorge@vitrubio.net> */ function hangar_enable_mime_types( $mimes ) { $mimes['svg'] = 'image/svg+xml'; return $mimes; } add_filter('upload_mimes', 'hangar_enable_mime_types');