How to remove_filter that filters iframes in posts? [duplicate]

This filter does not. This feature is disabled in the visual editor TinyMCE.

function wpse49619_change_mce_options($initArray) {
    $ext="iframe[align|longdesc|name|width|height|frameborder|scrolling|marginheight|marginwidth|src]";
    if ( isset( $initArray['extended_valid_elements'] ) ) {
        $initArray['extended_valid_elements'] .= ',' . $ext;
    } else {
        $initArray['extended_valid_elements'] = $ext;
    }
    // maybe; set tiny paramter verify_html
    //$initArray['verify_html'] = false;
    return $initArray;
}
add_filter('tiny_mce_before_init', 'wpse49619_change_mce_options');

Also you can use examples from WPEngineer how to enhancement TinyMCE.

Leave a Comment

error code: 523