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

Delete notifications.


Description Description

See also See also


Top ↑

Parameters Parameters

$args

(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()


Top ↑

Return Return

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


Top ↑

Source 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 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'] );
	}

Top ↑

Changelog 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.