bb_bozo_user_search_form_add_inputs

The BuddyPress bb bozo user search form add inputs function.

Description

bb_bozo_user_search_form_add_inputs( $r, $user_search_object ); 

Parameters (2)

0. $r
The r.
1. $user_search_object
The user search object.

Usage

  1. if ( !function_exists( 'bb_bozo_user_search_form_add_inputs' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-forums/bbpress/bb-plugins/bozo.php'; 
  3.  
  4. // The r. 
  5. $r = null; 
  6.  
  7. // The user search object. 
  8. $user_search_object = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = bb_bozo_user_search_form_add_inputs($r, $user_search_object); 
  12.  

Defined (1)

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

/bp-forums/bbpress/bb-plugins/bozo.php  
  1. function bb_bozo_user_search_form_add_inputs( $r, $user_search_object ) 
  2. $checked = ''; 
  3. if ( isset( $user_search_object->roles ) && is_array( $user_search_object->roles ) && in_array( 'bozo', $user_search_object->roles ) ) { 
  4. $checked = ' checked="checked"'; 
  5. $r .= "\t" . '<div>' . "\n"; 
  6. $r .= "\t\t" . '<label for="userbozo">' . __('Bozos only') . '</label>' . "\n"; 
  7. $r .= "\t\t" . '<div>' . "\n"; 
  8. $r .= "\t\t\t" . '<input class="checkbox-input" type="checkbox" name="userrole[]" id="userbozo" value="bozo"' . $checked . ' />' . "\n"; 
  9. $r .= "\t\t" . '</div>' . "\n"; 
  10. $r .= "\t" . '</div>' . "\n"; 
  11.  
  12. return $r;