admin管理员组文章数量:1336131
I would like to have people write on my blog and i am ok with editing their own posts while on draft. However, once their posts are published, I wouldn't like them to be able to edit/delete any published posts, not even the owned that they have written.
Is there a way to do that ?
I would like to have people write on my blog and i am ok with editing their own posts while on draft. However, once their posts are published, I wouldn't like them to be able to edit/delete any published posts, not even the owned that they have written.
Is there a way to do that ?
Share Improve this question asked Nov 13, 2012 at 20:44 SpyrosPSpyrosP 5152 gold badges10 silver badges23 bronze badges2 Answers
Reset to default 4Downgrade tham to Contributors user role.
Add this code to your functions.php file or just use Snippet plugins to add it to your WP site. If you don't know about how to use this kind of code just search a bit.
function wpb_change_author_role(){
global $wp_roles;
$wp_roles->remove_cap( 'author', 'delete_posts' );
$wp_roles->remove_cap( 'author', 'delete_published_posts' );
$wp_roles->remove_cap( 'author', 'publish_posts' );
$wp_roles->remove_cap( 'author', 'edit_published_posts' );
#$wp_roles->remove_cap( 'author', 'edit_posts' );
}
add_action('init', 'wpb_change_author_role');
本文标签: pluginsDisallow authors to editdelete their own or other published posts
版权声明:本文标题:plugins - Disallow authors to editdelete their own or other published posts 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742403868a2468422.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论