Role and Capabilities: How do I allow user role to access theme options without enabling 'manage_options'?

I'd like to allow a certain user role to access the theme options only. When I tried this in functions.php, nothing

I'd like to allow a certain user role to access the theme options only.

When I tried this in functions.php, nothing happened:

$limitedadmin = get_role('limitedadmin'); $limitedadmin->add_cap('edit_theme_options'); $limitedadmin->add_cap('edit_themes');

Then when I added this line to the above lines: $limitedadmin->add_cap('manage_options');, it gave the user role access to the theme options but also enabled access to several other options throughout the site like options to several plugins.

How can I just limit access to theme options?

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745661051a4638838.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信