bb_current_user_is_bozo

The BuddyPress bb current user is bozo function.

Description

bb_current_user_is_bozo( (bool) $topic_id = false ); 

Parameters (1)

0. $topic_id — Optional. (bool) => false
The topic id.

Usage

  1. if ( !function_exists( 'bb_current_user_is_bozo' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bbpress/bb-plugins/bozo.php'; 
  3.  
  4. // The topic id. 
  5. $topic_id = false; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bb_current_user_is_bozo($topic_id); 
  9.  

Defined (1)

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

/bp-forums/bbpress/bb-plugins/bozo.php  
  1. function bb_current_user_is_bozo( $topic_id = false ) { 
  2. global $bb_current_user; 
  3. if ( bb_current_user_can('browse_deleted') && 'all' == @$_GET['view'] ) 
  4. return false; 
  5. $is_bozo = isset($bb_current_user->data->is_bozo) && $bb_current_user->data->is_bozo; 
  6. if ( !$topic_id || $is_bozo ) 
  7. return $is_bozo; 
  8.  
  9. global $topic; 
  10. $topic = get_topic( $topic_id ); 
  11. $id = bb_get_current_user_info( 'id' ); 
  12. return isset($topic->bozos[$id]) && $topic->bozos[$id];