bp_gifts_send_giftsnotify

The Buddypress Gifts Latest 2014 bp gifts send giftsnotify function.

Description

bp_gifts_send_giftsnotify( $to_user_id, $from_user_id ); 

Parameters (2)

0. $to_user_id
The to user id.
1. $from_user_id
The from user id.

Usage

  1. if ( !function_exists( 'bp_gifts_send_giftsnotify' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress-gifts-latest-2014/includes/bp-gifts-core.php'; 
  3.  
  4. // The to user id. 
  5. $to_user_id = null; 
  6.  
  7. // The from user id. 
  8. $from_user_id = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = bp_gifts_send_giftsnotify($to_user_id, $from_user_id); 
  12.  

Defined (1)

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

/includes/bp-gifts-core.php  
  1. function bp_gifts_send_giftsnotify( $to_user_id, $from_user_id ) { 
  2.  
  3. global $bp; 
  4.  
  5.  
  6.  
  7.  
  8.  
  9. bp_core_add_notification( $from_user_id, $to_user_id, 'gifts', 'new_gifts' ); 
  10.  
  11.  
  12.  
  13. do_action( 'bp_gifts_send_gifts', $to_user_id, $from_user_id ); 
  14.  
  15.  
  16.  
  17. return true; 
  18.