The MU forums have moved to WordPress.org

MU Add_Role (3 posts)

  1. Wuogger
    Member
    Posted 14 years ago #

    Hi, I'd like the ability to create custom roles and have them apply globally. I tried creating a plugin (my first!) that defines the new role 'director'.

    $director_caps = array(
    ///'activate_plugins' => 0,
    'create_users' => 1,
    'delete_others_pages' => 1,
    'delete_others_posts' => 1,
    'delete_pages' => 1,
    **etc etc etc**
    
    function add_director_role() {
    add_role('director','Director',$director_caps);
    }
    add_action ('admin_head','add_director_role')
    ?>

    In functions.php I used print_r to display the array of capabilities. It appeared as if I had created the role correctly (it displays the same as 'editor' or 'author'. However, when I apply the role to a dummy user they are not allowed to access the dashboards where they are a 'director'.

    http://mu.wordpress.org/forums/topic/3983?replies=13 – this talks about hacking Role-manager and also looking at update-schema.php, which no longer exists. Can a hacked Role-manager create roles globally?

    Can anyone shed some light on this?

    Thanks!

  2. Wuogger
    Member
    Posted 14 years ago #

    I believe I solved the problem. Posted it here: http://mu.wordpress.org/forums/topic/14006?replies=2#post-81325

  3. luiseduardo
    Member
    Posted 14 years ago #

    Wuogger can u help me?

    I nedd my web in wordpress let me give to some users the acces to post, but in one category only.

    I want to asign different categorys to post a diferent users contributor.

    do u get me?

    excuse my english, am latino.

    thanx a lot your plugins are amazing.

    my mail is: eduardo_hp@hotmail.com

About this Topic

  • Started 14 years ago by Wuogger
  • Latest reply from luiseduardo