Home / functions.php / Support iframes in editor
  • How to Support iframes in editor

    support_iframes_in_editor

    Adding this to the functions.php of your wordpress theme will allow you to add iframes to the tinymce editor.

    ( click code to copy )

    wordpress snippet : PHP

    <>
    add_filter('tiny_mce_before_init', create_function( '$a','$a["extended_valid_elements"] = "iframe[id|class|title|style|align|frameborder|height|longdesc|marginheight|marginwidth|name|scrolling|src|width]"; return $a;') );
    

    ( WordPress codex functions, hooks, in this snippet. )

    tiny_mce_before_init, init, add_filter, _e,