Blog

Permitir iframes en Dynamic Fields de JetEngine

Artículos sobre Desarrollo Web - WordPress - GNU/Linux - Elementor Pro - Bricks - JetEngine

Si necesitamos mostrar un iframe llamado desde un campo personalizado con un widget normal de HTML, necesitamos habilitar el uso de iframes en los dynamics fields de JetEngine:

add_filter( 'wp_kses_allowed_html', function ( $tags, $context ){
    if ( 'post' === $context ) {
        $tags['iframe'] = array(
        'src' => true,
        'width' => true,
        'height' => true,
        'width' => true, 
        'frameborder' => true,
        'allowtransparency' => true,
        'allow' => true,
        );
    }
    return $tags;
},10,2);

Deja el primer comentario