curtismccaw things are not as simple as you might think when it comes to deal with unfiltered_html
. AAM indeed assigns the capability to desired role or user, however, this capability (as well as many other capabilities) has several conditions that needs to be met in order to be allowed:
- If you have defined global constant
DISALLOW_UNFILTERED_HTML
it has to be set to true
;
- If you have Multisite setup and you have to be super admin in order to have this capability.
Below is the code snippet from the WordPress core that defines these constraints:
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';
} elseif ( is_multisite() && ! is_super_admin( $user_id ) ) {
$caps[] = 'do_not_allow';
} else {
$caps[] = 'unfiltered_html';
}
break;