BP_Notifications_Notification::delete( array $args = array() )

Delete notifications.

Description

See also

Parameters

$args

(array) (Optional) Associative array of columns/values, to determine which rows should be deleted. Of the format array( 'item_id' => 7, 'component_action' => 'members', ).

Default value: array()

Return

(int|false) Number of rows deleted on success, false on failure.

Source

File: bp-notifications/classes/class-bp-notifications-notification.php

	public static function delete( $args = array() ) {
		$where = self::get_query_clauses( $args );

		/**
		 * Fires before the deletion of a notification item.
		 *
		 * @since BuddyPress 2.0.0
		 *
		 * @param array $args Associative array of columns/values, to determine
		 *                    which rows should be deleted. Of the format
		 *                    array( 'item_id' => 7, 'component_action' => 'members' ).
		 */
		do_action( 'bp_notification_before_delete', $args );

		return self::_delete( $where['data'], $where['format'] );
	}

Changelog

Changelog
Version Description
BuddyPress 1.9.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.