WordPress.org

Support

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

[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!

    Bobby

    http://wordpress.org/extend/plugins/user-role-editor/

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

    @shinephp

    Hello,

    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.
    if ( defined('DISALLOW_UNFILTERED_HTML') && DISALLOW_UNFILTERED_HTML ) {
    	$caps[] = 'do_not_allow';
    	break;
    }
    // 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;
    }
    break;

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

    Vladimir.

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