bp_core_delete_notifications_for_user_by_type

BP 1.5 simplified notification functions a bit.

Description

bp_core_delete_notifications_for_user_by_type( $user_id, (string) $component_name, $component_action ); 

Parameters (3)

0. $user_id
The user id.
1. $component_name (string)
The component name.
2. $component_action
The component action.

Usage

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

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_type( $user_id, $component_name, $component_action ) { 
  2. _deprecated_function( __FUNCTION__, '1.5', 'bp_core_delete_notifications_by_type()' ); 
  3. return BP_Core_Notification::delete_for_user_by_type( $user_id, $component_name, $component_action );