admin管理员组文章数量:1126298
I'm building a wp blocks theme for in-house websites with controlled branding. This theme will be rolled out to hundreds of websites.
I want to create a second level administrator role and remove capabilities like install_plugins, install_themes, delete_themes, delete_plugins, edit_plugins, edit_themes. But this role needs all management of content and users.
How can I give this role the capability to edit the Site Editor - Navigation? And not allow the role to edit anything else in the theme, no editing header/footer, page templates or patterns.
I only want to do this in the functions.php to avoid having hundreds of websites with additional plugins for managing a simple lock down feature.
Example code:
add_role( 'test2', 'test2', get_role( 'administrator' )->capabilities );
$role = get_role( 'test2');
$role->remove_cap('edit_theme_options');
add_action( 'admin_init', 'my_theme_caps');
/????what is the method to make it enable nav_menus ????/
Thank you for your advice
本文标签: navigationAddremove capability for blocks theme nav menu
版权声明:本文标题:navigation - Addremove capability for blocks theme nav menu 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736632711a1945810.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论