bp_core_delete_notifications_for_user_by_item_id

The BuddyPress bp core delete notifications for user by item id function.

Description

bp_core_delete_notifications_for_user_by_item_id( $user_id, $item_id, (string) $component_name, $component_action, (bool) $secondary_item_id = false ); 

Parameters (5)

0. $user_id
The user id.
1. $item_id
The item id.
2. $component_name (string)
The component name.
3. $component_action
The component action.
4. $secondary_item_id — Optional. (bool) => false
The secondary item id.

Usage

  1. if ( !function_exists( 'bp_core_delete_notifications_for_user_by_item_id' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-core/deprecated/1.5.php'; 
  3.  
  4. // The user id. 
  5. $user_id = null; 
  6.  
  7. // The item id. 
  8. $item_id = null; 
  9.  
  10. // The component name. 
  11. $component_name = ''; 
  12.  
  13. // The component action. 
  14. $component_action = null; 
  15.  
  16. // The secondary item id. 
  17. $secondary_item_id = false; 
  18.  
  19. // NOTICE! Understand what this does before running. 
  20. $result = bp_core_delete_notifications_for_user_by_item_id($user_id, $item_id, $component_name, $component_action, $secondary_item_id); 
  21.  

Defined (1)

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

/bp-core/deprecated/1.5.php  
  1. function bp_core_delete_notifications_for_user_by_item_id( $user_id, $item_id, $component_name, $component_action, $secondary_item_id = false ) { 
  2. _deprecated_function( __FUNCTION__, '1.5', 'bp_core_delete_notifications_by_item_id()' ); 
  3. return BP_Core_Notification::delete_for_user_by_item_id( $user_id, $item_id, $component_name, $component_action, $secondary_item_id );