bp_notifications_delete_notifications_from_user( int $user_id, string $component_name, string $component_action )

Delete all notifications from a user.

Description Description

Used when clearing out all notifications for a user, when deleted or spammed.

Top ↑

Parameters Parameters


(int) (Required) ID of the user whose associated items are being deleted.


(string) (Required) Name of the associated component.


(string) (Required) Name of the associated action.

Top ↑

Return Return

(int|false) True on success, false on failure.

Source Source

File: bp-notifications/bp-notifications-functions.php

function bp_notifications_delete_notifications_from_user( $user_id, $component_name, $component_action ) {
	return BP_Notifications_Notification::delete( array(
		'item_id'           => $user_id,
		'component_name'    => $component_name,
		'component_action'  => $component_action,
	) );

Top ↑

Changelog Changelog

Version Description
1.9.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.