admin管理员组文章数量:1122832
I have some custom user roles for proofreaders which do not have the capability to create posts of my custom post types.
Unfortunately I am unable to find out how to remove that capability for the bulit-in post
post type.
The Members plugin does not show the create_post
argument, so I can't set it do deny (false).
Thanks for your help.
I have some custom user roles for proofreaders which do not have the capability to create posts of my custom post types.
Unfortunately I am unable to find out how to remove that capability for the bulit-in post
post type.
The Members plugin does not show the create_post
argument, so I can't set it do deny (false).
Thanks for your help.
Share Improve this question asked Oct 3, 2016 at 10:21 SamSam 4356 silver badges18 bronze badges 2- Do you want to prevent them editing existing posts and deleting posts too? – Andy Macaulay-Brook Commented Oct 3, 2016 at 10:54
- @AndyMacaulay-Brook They should be able to edit them (correct errors), but they should not be able to delete them, yes! – Sam Commented Oct 3, 2016 at 11:21
1 Answer
Reset to default 0There is no built-in capability of create_post
.
Update: There is a capability create_posts
but it's not well publicised and also has issues surrounding it which I'm afraid I don't have time to look into at the moment.
There are already answers that might help:
https://stackoverflow.com/a/3248103
https://wordpress.stackexchange.com/a/178059/94267
Original answer:
There is publish_posts
. You need to turn this off for those users. Removing this capability doesn't prevent a user or role from writing a draft post, but it does prevent them from publishing it, so it won't be seen outside the admin.
Currently (WP 4.6) posts have these capabilities associated with them:
edit_posts
edit_others_posts
publish_posts
read_private_posts
delete_posts
delete_private_posts
delete_published_posts
delete_others_posts
edit_private_posts
edit_published_posts
You probably want to disallow the *_private_*
capabilities for anyone but Admins too.
本文标签: user rolesDisable createpost for builtin post type
版权声明:本文标题:user roles - Disable `create_post` for built-in post type 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736287446a1927882.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论