Skip to:
Content

Changeset 4350


Ignore:
Timestamp:
11/07/12 08:30:32 (18 months ago)
Author:
johnjamesjacoby
Message:

Capabilities:

  • Hook bbp_add_forums_roles() to 'bbp_setup_theme' since it's before user init.
  • Add anonymous role to dynamic role loader.
  • Fixes issues with roles not being mapped correctly on new installations.
Location:
trunk/includes/core
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/core/actions.php

    r4330 r4350  
    7878 */ 
    7979add_action( 'bbp_init', 'bbp_register',         0   ); 
    80 add_action( 'bbp_init', 'bbp_add_forums_roles', 1   ); 
    8180add_action( 'bbp_init', 'bbp_add_rewrite_tags', 20  ); 
    8281add_action( 'bbp_init', 'bbp_ready',            999 ); 
     82 
     83/** 
     84 * There is no action API for roles to use, so hook in immediately after the 
     85 * $wp_roles global is set, which is the 'setup_theme' action. 
     86 * 
     87 * This is kind of lame, but is all we have for now. 
     88 */ 
     89add_action( 'bbp_setup_theme', 'bbp_add_forums_roles', 1 ); 
    8390 
    8491/** 
  • trunk/includes/core/capabilities.php

    r4330 r4350  
    380380        ), 
    381381 
     382        // Anonymous 
     383        bbp_get_anonymous_role() => array( 
     384            'name'         => __( 'Anonymous', 'bbpress' ), 
     385            'capabilities' => bbp_get_caps_for_role( bbp_get_participant_role() ) 
     386        ), 
     387 
    382388        // Blocked 
    383389        bbp_get_blocked_role() => array( 
Note: See TracChangeset for help on using the changeset viewer.