Code

« See all FAQs for WordPress Tooltips Ultimate & Image Hotspot

I can’t put an iframe in a tooltip.

Sometimes wordpress is not allowing to add iframes inside editors. Just include this code in your functions.php:

add_filter( 'wp_kses_allowed_html', 'custom_wpkses_post_tags', 10, 2 );

function custom_wpkses_post_tags( $tags, $context ) {

    global $post;
    $post_types = array('tooltip_selectors', 'wpcmtt_hotspots');
    if ( 'post' === $context && $post && $post->post_type && in_array($post->post_type, $post_types) ){
        $tags['iframe'] = array(
            'src'             => true,
            'height'          => true,
            'width'           => true,
            'frameborder'     => true,
            'allowfullscreen' => true,
        );
    }

    return $tags;
}

by
by
by
by
by
by

Tell us what you think!

We'd like to ask you a few questions to help improve CodeCanyon.

Sure, take me to the survey