我创建了一个自定义用户角色,但发生了一些奇怪的事情。
这就是角色:
add_role(\'custom-role\', \'Custom Role\', array(
\'activate_plugins\' => false,
\'delete_others_pages\' => true,
\'delete_others_posts\' => false,
\'delete_pages\' => true,
\'delete_posts\' => false,
\'delete_private_pages\' => true,
\'delete_private_posts\' => false,
\'delete_published_pages\' => true,
\'delete_published_posts\' => false,
\'edit_dashboard\' => false,
\'edit_others_pages\' => false,
\'edit_others_posts\' => false,
\'edit_pages\' => true,
\'edit_posts\' => false,
\'edit_private_pages\' => true,
\'edit_private_posts\' => false,
\'edit_published_pages\' => true,
\'edit_published_posts\' => false,
\'edit_theme_options\' => false,
\'export\' => false,
\'import\' => false,
\'list_users\' => true,
\'manage_categories\' => false,
\'manage_links\' => false,
\'manage_options\' => false,
\'moderate_comments\' => false,
\'promote_users\' => false,
\'publish_pages\' => true,
\'publish_posts\' => false,
\'read_private_pages\' => false,
\'read_private_posts\' => false,
\'read\' => false,
\'remove_users\' => true,
\'switch_themes\' => false,
\'upload_files\' => true,
\'update_core\' => false,
\'update_plugins\' => false,
\'update_themes\' => false,
\'install_plugins\' => false,
\'install_themes\' => false,
\'delete_themes\' => false,
\'delete_plugins\' => false,
\'edit_plugins\' => false,
\'edit_theme\' => false,
\'edit_files\' => false,
\'edit_users\' => true,
\'create_users\' => true,
\'delete_users\' => true,
\'unfiltered_html\' => false
));
这一点也不奇怪。但问题是,首先我将所有值设置为
false
.如果我使用所选角色登录用户,则会显示
Dashboard
,
posts
,
reactions
,
profile
和
extra
.
问题是,如果我将值从false
到true
没有任何变化
我已注销和登录,删除了我的Cookie并删除了缓存。
我不知道怎么解决这个问题。