• Ismael Latorre

    (@miguelripoll)


    Hi,

    I am using the User Role Editor plugin to filter capabilities, and at the moment Authors and Contributors do NOT have comment moderation capabilities assigned to them. Your plugin works fine up to the moderation point: all roles are able to moderate, edit and even delete other user’s comments, even those roles (Author and Contributor) who are now allowed to moderate comments.

    I have been racking my brains as to why this is happening, and the only possible explanation is a little function to rename roles I have in my theme. Do you think this might be the culprit? And if not, what can be the possible explanation?

    // Change user role names
    
    function change_role_name() {
        global $wp_roles;
    
        if ( ! isset( $wp_roles ) )
            $wp_roles = new WP_Roles();
    
        $wp_roles->roles['author']['name'] = 'Faculty';
        $wp_roles->role_names['author'] = 'Faculty';
    	$wp_roles->roles['contributor']['name'] = 'Undergraduate Student';
        $wp_roles->role_names['contributor'] = 'Undergraduate Student';
    	$wp_roles->roles['subscriber']['name'] = 'Guest';
        $wp_roles->role_names['subscriber'] = 'Guest';
    }
    add_action('init', 'change_role_name');

    https://wordpress.org/plugins/ajaxed-comments/

  • The topic ‘Moderation available to all users’ is closed to new replies.