bbp_after_setup_theme

There is no action API for roles to use, so hook in immediately after everything is included (including the theme's functions.php.

Description

add_action( 'bbp_after_setup_theme', (string) $bbp_add_forums_roles, (int) $int ); 

This is after the $wp_roles global is set but before $wp->init().

If it's hooked in any sooner, role names may not be translated correctly.

Parameters (2)

0. $bbp_add_forums_roles (string) => 'bbp_add_forums_roles'
The bbp add forums roles.
1. $int (int) => 1
The int.

Usage

To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'bbp_after_setup_theme', $bbp_add_forums_roles, $int ); 
The following example is for adding a hook callback.
  1. // define the bbp_after_setup_theme callback 
  2. function action_bbp_after_setup_theme( $bbp_add_forums_roles, $int ) { 
  3. // make action magic happen here... 
  4. }; 
  5.  
  6. // add the action 
  7. add_action( 'bbp_after_setup_theme', 'action_bbp_after_setup_theme', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( 'bbp_after_setup_theme', 'action_bbp_after_setup_theme', 10, 2 ); 

Defined (3)

The action is defined in the following location(s).

/includes/core/actions.php  
  1. add_action( 'bbp_after_setup_theme', 'bbp_add_forums_roles', 1 ); 
  1. add_action( 'bbp_after_setup_theme', 'bbp_load_theme_functions', 10 ); 
/includes/core/sub-actions.php  
  1. do_action( 'bbp_after_setup_theme' );