• Resolved jester48

    (@jester48)


    I have a multi-site installation and i need to give 2 people network admin access but control their menu options, i have plugin for managing the menu,but if i apply it to super user it also applies to my options, i need to create a user role with the same settings but a different name.

    I have

    add_action('admin_init', 'cloneRole');
    
    function cloneRole(){
        global $wp_roles;
        if ( ! isset( $wp_roles ) ){
            $wp_roles = new WP_Roles();
    	}
    
        $adm = $wp_roles->get_role('super_admin');
        //Adding a 'new_role' with all admin caps
        $wp_roles->add_role('alt_super_admin', 'alt Super Admin', $adm->capabilities);
    }

    which adds the role but does not give super admin capabilities, is there another option?

    TIA

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Roles are per site, not network wide, and Super Admin is special.

    There is ONE way to add a new SuperAdmin. Go to WP Admin -> NEtwork -> Users

    Click on the user you want to give Super Admin access to and edit the profile.

    Check the box for Super Admin access

    Save.

    Repeat.

    Thread Starter jester48

    (@jester48)

    There is ONE way to add a new SuperAdmin. Go to WP Admin -> NEtwork -> Users

    despite your assurances, I was able to accomplish what I was looking to do by cloning the admin, adding network capabilities, removing specific privileges and giving the new role super admin access at run time

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Network Admin – clone to new role’ is closed to new replies.