In wp-includes/capabilities.php, we can find the code like below.
case ‘unfiltered_html’:
// Disallow unfiltered_html for all users, even admins and super admins.
if ( defined(‘DISALLOW_UNFILTERED_HTML’) && DISALLOW_UNFILTERED_HTML ) {
$caps[] = ‘do_not_allow’;
break;
}
In multi-site installation, always returns’do_not_allow’ for the ‘unfiltered_html’ if you are not the superadmin in the multi-site environment. So it was removed by WordPress every time I saved the post changes inspite of I made that under account with ‘Editor’ role privileges.
Solution 1: So if we install the wordpress “unfiltered-mu” plugin, we can give the privileges for Editor Role to update the mordern HTML5 tag like ‘
Solution 2:
if ( defined(‘DISALLOW_UNFILTERED_HTML’) && DISALLOW_UNFILTERED_HTML ) {
$caps[] = ‘do_not_allow’;
break;
}else{
$caps[] = $caps;
}