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条)