This function has been deprecated. Deprecated since BuddyPress 1.9.0. Use bp_notifications_delete_notifications_by_item_id() instead.

bp_core_delete_notifications_by_item_id( int $user_id,  $item_id, string $component_name, string $component_action,  $secondary_item_id = false )

Delete notifications for an item ID.

Description

Used when clearing out notifications for a specific component when the user has visited that component.

Parameters

$user_id

(Required)

$component_name

(Required)

$component_action

(Required)

Return

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

Source

File: bp-core/deprecated/buddypress/1.9.php

function bp_core_delete_notifications_by_item_id( $user_id, $item_id, $component_name, $component_action, $secondary_item_id = false ) {

	// Bail if notifications is not active
	if ( ! bp_is_active( 'notifications' ) ) {
		return false;
	}

	// Trigger the deprecated function notice
	_deprecated_function( __FUNCTION__, '1.9', 'bp_notifications_delete_notifications_by_item_id()' );

	return bp_notifications_delete_notifications_by_item_id( $user_id, $item_id, $component_name, $component_action, $secondary_item_id );
}

Changelog

Changelog
Version Description
BuddyPress 1.0.0 Introduced.

Questions?

We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.