BP_Notifications_Notification::delete( array $args = array() )
Delete notifications.
Description Description
See also See also
- BP_Notifications_Notification::get(): for a description of accepted update/where arguments.
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()
Return Return
(int|false) Number of rows deleted on success, false on failure.
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'] ); }
Changelog Changelog
Version | Description |
---|---|
1.9.0 | Introduced. |