/*
Theme Name:   Hello Elementor Child
Theme URI:    https://elementor.com/
Description:  Tema filho para o Hello Elementor, ideal para customizações personalizadas.
Author:       Rodrigo
Author URI:   https://viaweb.art.br
Template:     hello-elementor
Version:      1.0.0
Text Domain:  hello-elementor-child
*/

/* Suas customizações de CSS começam abaixo desta linha */

function adicionar_mime_svg($mimes) {
    $mimes['svg'] = 'image/svg+xml';
    return $mimes;
}
add_filter('upload_mimes', 'adicionar_mime_svg');

function corrigir_mime_svg($data, $file, $filename, $mimes) {
    $filetype = wp_check_filetype($filename, $mimes);
    return [
        'ext'             => $filetype['ext'],
        'type'            => $filetype['type'],
        'proper_filename' => $data['proper_filename'],
    ];
}
add_filter('wp_check_filetype_and_ext', 'corrigir_mime_svg', 10, 4);