bp_gifts_setup_globals

Bp_gifts_setup_globals().

Description

bp_gifts_setup_globals(); 

Sets up global variables for your component.


Usage

  1. if ( !function_exists( 'bp_gifts_setup_globals' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress-gifts-latest-2014/includes/bp-gifts-core.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bp_gifts_setup_globals(); 
  7.  

Defined (1)

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

/includes/bp-gifts-core.php  
  1. function bp_gifts_setup_globals() { 
  2.  
  3. global $bp, $wpdb; 
  4.  
  5. $bp->gifts->id = 'gifts'; 
  6.  
  7. $bp->gifts->table_name = $wpdb->base_prefix . bp_gifts; 
  8.  
  9. $bp->gifts->table_name_data = $wpdb->base_prefix . 'bp_gifts_data'; 
  10.  
  11. $bp->gifts->format_notification_function = 'bp_gifts_format_notifications'; 
  12.  
  13. $bp->gifts->slug = BP_GIFTS_SLUG
  14.  
  15. $bp->active_components[$bp->gifts->slug] = $bp->gifts->id; 
  16.  
  17. }