自定义的文章类型默认权限耿跟随WordPress的权限使用,即贡献者(有发布文章权限)默认也可以使用,如部分自定义权限如果只要求管理员可用。在自定义文章类型做如下配置:
'capabilities' => array( 'edit_post' => 'administrator', 'edit_posts' => 'administrator', 'edit_others_posts' => 'administrator', 'publish_posts' => 'administrator', 'read_post' => 'administrator', 'read_private_posts' => 'administrator', 'delete_post' => 'administrator', ) ,
插入位置参考