setup_actions(); } /** * Setup the admin hooks, actions and filters * * @since bbPress (r2646) * @access private * * @uses add_action() To add various actions */ function setup_actions() { // Bail if in network admin if ( is_network_admin() ) return; // User profile edit/display actions add_action( 'edit_user_profile', array( $this, 'secondary_role_display' ) ); // WordPress user screen add_action( 'restrict_manage_users', array( $this, 'user_role_bulk_dropdown' ) ); add_filter( 'manage_users_columns', array( $this, 'user_role_column' ) ); add_filter( 'manage_users_custom_column', array( $this, 'user_role_row' ), 10, 3 ); // Process bulk role change add_action( 'load-users.php', array( $this, 'user_role_bulk_change' ) ); } /** * Default interface for setting a forum role * * @since bbPress (r4285) * * @param WP_User $profileuser User data * @return bool Always false */ public static function secondary_role_display( $profileuser ) { // Bail if current user cannot edit users if ( ! current_user_can( 'edit_user', $profileuser->ID ) ) return; // Get the roles $dynamic_roles = bbp_get_dynamic_roles(); // Only keymasters can set other keymasters if ( ! bbp_is_user_keymaster() ) unset( $dynamic_roles[ bbp_get_keymaster_role() ] ); ?>

ID ); ?>