Site icon Hip-Hop Website Design and Development

Iframe disappears when writer updates web page

If a person has an writer position and is listed because the writer of a web page, after they make modifications to the web page and click on replace, the modifications are made however the iframe that was within the wysiwyg disappears and now not exhibits on the back-end or front-end. If an administrator or editor makes the modifications and saves it, the iframe stays.

Moreover altering the person position to editor, how do I stop the iframe from disappearing?

I attempted having the writer paste the iframe code into the textual content view and replace it whereas nonetheless in textual content view on the wysiwyg.

I attempted including these coding snippets into the features file in hopes that it could stop wp from stripping it, however they seem to be a no-go.

This:

perform custom_rewrite_basic() {
   add_rewrite_rule('^about-us/careers/([wd-]+)/?', 'index.php? 
   post_type=jobs&identify=$matches[1]', 'prime');
}
add_action('init', 'custom_rewrite_basic');

perform add_iframe($initArray) frameborder

// this perform alters the best way the WordPress editor filters your code
add_filter('tiny_mce_before_init', 'add_iframe');

And this:

perform km_add_unfiltered_html_capability_to_editors( $caps, $cap, $user_id ) {
    if ( 'unfiltered_html' === $cap && user_can( $user_id, 'editor' ) ) {
        $caps = array( 'unfiltered_html' );
    }
    return $caps;
}
add_filter( 'map_meta_cap', 'km_add_unfiltered_html_capability_to_editors', 1, 3 );