【发布时间】:2016-02-02 01:45:01
【问题描述】:
我刚刚使用我的 functions.php 文件中的以下代码创建了一个自定义用户角色“Lister”。 我有新角色在后端工作,并创建了一个用户进行测试。登录后,唯一的菜单选项是 Profile 和 Dashboard。为什么没有帖子菜单项? 谢谢
$lister_user_role = add_role('lister', __('Lister'),
array(
'read' => true, //true allows this capability
'edit_posts' => true, //allows user to edit posts
'create_posts' => true, //allows users to create posts
'publish_posts' => true, //allows users to publish posts
'delete_posts' => false, //do not allow user to delete posts
'edit_others_posts' => false, //do not allow a lister to edit others' posts
'edit_themes' => false, //do not allow a lister to edit theme
'install_plugins' => false, //do not allow a lister to install plugins
'update_plugin' => false, //do not allow a lister to update plugins
'update_core' => false //do not allow a lister to update WP Core
)
);
【问题讨论】:
标签: wordpress