bp_admin_sanitize_callback_force_buddybar

Sanitization for _bp_force_buddybar.

Description

bp_admin_sanitize_callback_force_buddybar( (bool) $value = false ); 

If upgraded to 1.6 and you chose to keep the BuddyBar, a checkbox asks if you want to switch to the WP Toolbar. The option we store is 1 if the BuddyBar is forced on, so we use this function to flip the boolean before saving the intval.

Parameters (1)

0. $value — Optional. (bool) => false
The value.

Usage

  1. if ( !function_exists( 'bp_admin_sanitize_callback_force_buddybar' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-core/deprecated/2.1.php'; 
  3.  
  4. // The value. 
  5. $value = false; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = bp_admin_sanitize_callback_force_buddybar($value); 
  9.  

Defined (1)

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

/bp-core/deprecated/2.1.php  
  1. function bp_admin_sanitize_callback_force_buddybar( $value = false ) { 
  2. return $value ? 0 : 1;