Skip to:
Content

bbPress.org

Changeset 6116


Ignore:
Timestamp:
11/03/2016 03:43:38 AM (7 years ago)
Author:
johnjamesjacoby
Message:

Roles: Remove overzealous usages of bbp_add_forums_roles().

Now that the wp_roles_init action exists, we can rely on bbPress roles being registered an available, and no longer need to re-reinitalize them before trying to interact with them.

See: #2959.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/users/capabilities.php

    r6111 r6116  
    158158            // Add the new role
    159159            if ( ! empty( $new_role ) ) {
    160 
    161                 // Make sure bbPress roles are added
    162                 bbp_add_forums_roles();
    163 
    164160                $user->add_role( $new_role );
    165161            }
     
    224220 */
    225221function bbp_get_user_blog_role( $user_id = 0 ) {
    226 
    227     // Add bbPress roles (returns $wp_roles global)
    228     bbp_add_forums_roles();
    229222
    230223    // Validate user id
     
    377370    // Add the user to the site
    378371    if ( true === $add_to_site ) {
    379 
    380         // Make sure bbPress roles are added
    381         bbp_add_forums_roles();
    382 
    383372        $bbp->current_user->add_role( $new_role );
    384373
Note: See TracChangeset for help on using the changeset viewer.