WordPress.org

Ready to get started?Download WordPress

Forums

BulletProof Security
[resolved] What is the role/capability name? (4 posts)

  1. jimmyzzzz
    Member
    Posted 1 year ago #

    I am looking to create a custom role (via Members plugin) and see that there is no capability listed by default for BPS Security. What is the role name or capability name for BPS security?
    Thanks.
    JZ

    http://wordpress.org/extend/plugins/bulletproof-security/

  2. AITpro
    Member
    Plugin Author

    Posted 1 year ago #

    BPS checks for manage_options - current_user_can('manage_options');, which is an Administrator Role.

    http://codex.wordpress.org/Roles_and_Capabilities#Administrator

  3. AITpro
    Member
    Plugin Author

    Posted 1 year ago #

    Did this answer your question?
    An interesting idea that I have never condsidered adding before, but might have some usefulness? I will see if there are any benefits to adding something like this to BPS. Thanks.

    Source: http://wordpress.stackexchange.com/questions/31471/how-to-create-a-clone-role-in-wordpress

    add_action('init', 'cloneRole');
    
    function cloneRole()
    {
        global $wp_roles;
        if ( ! isset( $wp_roles ) )
            $wp_roles = new WP_Roles();
    
        $adm = $wp_roles->get_role('administrator');
        //Adding a 'new_role' with all admin caps
        $wp_roles->add_role('new_role', 'My Custom Role', $adm->capabilities);
    }
  4. AITpro
    Member
    Plugin Author

    Posted 1 year ago #

    Resolving question has been answered.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic