bp_gifts_remove_data

The Buddypress Gifts Latest 2014 bp gifts remove data function.

Description

bp_gifts_remove_data( $user_id ); 

Parameters (1)

0. $user_id
The user id.

Usage

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

Defined (1)

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

/includes/bp-gifts-core.php  
  1. function bp_gifts_remove_data( $user_id ) { 
  2.  
  3. /** You'll want to run a function here that will delete all information from any component tables 
  4.   
  5. for this $user_id */ 
  6.  
  7.  
  8.  
  9. /** Remember to remove usermeta for this component for the user being deleted */ 
  10.  
  11. delete_usermeta( $user_id, 'notification_gifts_received' ); 
  12.  
  13.  
  14.  
  15. do_action( 'bp_gifts_remove_data', $user_id ); 
  16.