Allowing Unfiltered HTML for WordPress Editors

In a WordPress Network site, Editors are prevented from being able to edit html. This is for security in case that Editor should not have capabilities outside of their own site.  If the Editor user is trusted, then use the code below in your theme’s functions file to allow them to modify iframe or other html embeds:

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

Alternatively, you can install and activate a plugin authored by Automattic: https://wordpress.org/plugins/unfiltered-mu/

If you prefer remote hands from a friendly Valice support professional to assist you, we have membership plans for that. Or if you just want one-time help, click here to schedule a session.