add switch_theme capability to contributor

Hi – first post and new to this great site – have learned a lot so far by lurking but need advice as to accomplish this task.

How can I tweak a user role to include a specific capability not inherently assigned to it? For example – I want the contributor level to be able to switch themes, would prefer to disallow the submenu(widget,theme-options, etc) if possible. Played with schema.php, menu.php but no dice – am I close?

Seems like there a many plugins and tips on issues very close to this – dsaders menus plugin, adminimize are close.

thanks

chris

ps – if you are wondering why, we are rolling out about 500 student blogs next week to student K-8 – assigning them as contributor but they will of course want a little creative license with their site. thanks for releasing batch create!

  • Andrew
    • Champion of Loops

    Basically what you need is a plugin that will give contributors the "switch_theme" capability and also removes the menu items (because they’ll be enabled if you add the "switch theme" capability).

    You might be able to find a couple of plugins (one for roles, one for the menu) that provide you with the features you need to do this but I’d really suggest a custom plugin.

    Thanks,

    Andrew

  • Gail Soriano
    • Design Lord, Child of Thor

    Thanks Andrew – but couldn’t I just edit schema.php to include switch_themes for contributor? I have added

    $role->add_cap(‘switch_themes’:wink:;

    to contributor caps in schema.php but nothing happens – doesn’t seem to make a difference if I add that for editor or author either – am I misunderstanding what this is supposed to do?

    thanks

    chris

  • Gail Soriano
    • Design Lord, Child of Thor

    is there a plugin that gets the past 4 hours of my life back?

    thanks – that will do what I need – didn’t realize schema was only impacting new blogs

    from there I think I can craft a quick plugin to restrict appearance when I want to pull it back from students