我已在中定义了自定义用户角色functions.php
名为“Dashboard Admin”,具有以下定义的功能。该网站有许多自定义帖子类型-所有这些都具有功能post
- 我基本上希望将此角色的功能锁定为仅创建/编辑/删除帖子(任何类型),而不是页面、管理类别或任何其他更高级别的管理任务。出于某种原因,使用下面的数组,当以该用户类型登录时,只能创建新帖子和“提交以供审阅”,而不能打开或编辑任何帖子类型的任何现有帖子-我这里缺少什么?提前感谢!
$result = add_role(
\'dashboard_admin\',
__( \'Dashboard Admin\' ),
array(
\'read\' => true,
\'publish_posts\' => true,
\'edit_posts\' => true,
\'edit_others_posts\' => true,
\'edit_published_posts\' => true,
\'delete_posts\' => true,
\'delete_others_posts\' => true,
\'delete_published_posts\' => true,
\'read_private_posts\' => true,
\'edit_private_posts\' => true,
\'delete_private_posts\' => true,
\'upload_files\' => true,
\'publish_pages\' => false,
\'edit_pages\' => false,
\'edit_others_pages\' => false,
\'delete_pages\' => false,
\'delete_published_pages\' => false,
\'delete_others_pages\' => false,
\'manage_categories\' => false,
\'install_plugins\' => false,
\'activate_plugins\' => false,
\'update_plugins\' => false,
\'edit_plugins\' => false,
\'delete_plugins\' => false,
\'edit_dashboard\' => false,
\'switch_themes\' => false,
\'edit_theme_options\' => false,
\'create_users\' => false,
\'list_users\' => false,
\'edit_users\' => false,
\'delete_users\' => false,
\'promote_users\' => false,
\'remove_users\' => false,
\'customize\' => false,
\'manage_options\' => false,
\'delete_site\' => false,
\'import\' => false,
\'export\' => false,
)
);