admin管理员组文章数量:1130349
Sorry for my English first.
What I want to achive is, that it is possible to change existing posts and not possible to add New Posts for the user role "Editor". Is it possible with wp caps or do I need a ugly JS-Hack... to achive this?
Hi there. Did i missed something? What I've done so far
function fsi_remove_addCap() {
global $wp_roles;
$wp_roles->add_cap( 'editor', 'create_pages' );
$wp_roles->remove_cap( 'editor', 'edit_pages' );
}
add_action( 'init', 'fsi_remove_addCap' );
Result: It's impossible to edit existing pages too.
Sorry for my English first.
What I want to achive is, that it is possible to change existing posts and not possible to add New Posts for the user role "Editor". Is it possible with wp caps or do I need a ugly JS-Hack... to achive this?
Hi there. Did i missed something? What I've done so far
function fsi_remove_addCap() {
global $wp_roles;
$wp_roles->add_cap( 'editor', 'create_pages' );
$wp_roles->remove_cap( 'editor', 'edit_pages' );
}
add_action( 'init', 'fsi_remove_addCap' );
Result: It's impossible to edit existing pages too.
本文标签: Not allow add New Page for role 39editor39
版权声明:本文标题:Not allow add New Page for role 'editor' 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749255390a2340388.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论