Support » Plugin: User Role Editor » [Plugin: User Role Editor] Adding unfiltered_html to Author

  • Greetings,

    I’m running Multisite, but as a test, I only activated the plugin on one of my blogs. I set the plugin to allow unfilted html and unfiltered uploads for Authors. I think logged in as a user with Author role. I edited a post that has youtube embed code in it. I hit save. The code is stripped out. Please help!


Viewing 1 replies (of 1 total)
  • Plugin Author Vladimir Garagulia



    It seems that from some version WordPress developers decided to prohibit “unfiltered_html” globally and allow that for the superadmin in the multisite environment only.

    function map_meta_cap() at the capabilities.php always returns ‘do_not_allow’ for the ‘unfiltered_html’ if you are not the superadmin in the multi-site environment. So we can consider this capability as deprecated. Look on this code fragment if you are interested:

    case 'unfiltered_html':
    // Disallow unfiltered_html for all users, even admins and super admins.
    	$caps[] = 'do_not_allow';
    // Fall through if not DISALLOW_UNFILTERED_HTML
    case 'delete_user':
    case 'delete_users':
    // If multisite these caps are allowed only for super admins.
    if ( is_multisite() && !is_super_admin( $user_id ) ) {
    $caps[] = 'do_not_allow';
    } else {
    if ( 'delete_user' == $cap )
    	$cap = 'delete_users';
    	$caps[] = $cap;

    Thanks for the interesting question. I didn’t know about such change in the WordPress functionality.


Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: User Role Editor] Adding unfiltered_html to Author’ is closed to new replies.