In functions.php

add_filter( 'wp_kses_allowed_html', 'acf_allowed_html', 10, 2 );
    function acf_allowed_html( $tags, $context ) {
        if ( $context === 'acf' ) {
            $tags['iframe'] = array(
                'src'             => true,
                'height'          => true,
                'width'           => true,
                'frameborder'     => true,
                'allowfullscreen' => true,
            );
            $tags['svg']  = array(
                'xmlns'       => true,
                'fill'        => true,
                'viewbox'     => true,
                'role'        => true,
                'aria-hidden' => true,
                'focusable'   => true,
            );
            $tags['path'] = array(
                'd'    => true,
                'fill' => true,
            );
            $tags['script'] = array(
                'src'             => false,
                'type'          => true,
            );
        }
    
        return $tags;
    }
Geef een reactie 0