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