BP_Notifications_Notification::update( array $update_args = array(), array $where_args = array() )

Update notifications.

Description Description

See also See also

Top ↑

Parameters Parameters


(array) (Optional) Associative array of fields to update, and the values to update them to. Of the format array( 'user_id' => 4, 'component_name' => 'groups', ).

Default value: array()


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

Default value: array()

Top ↑

Return Return

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

Top ↑

Source Source

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

	public static function update( $update_args = array(), $where_args = array() ) {
		$update = self::get_query_clauses( $update_args );
		$where  = self::get_query_clauses( $where_args  );

		 * Fires before the update of a notification item.
		 * @since 2.3.0
		 * @param array $update_args See BP_Notifications_Notification::update().
		 * @param array $where_args  See BP_Notifications_Notification::update().
		do_action( 'bp_notification_before_update', $update_args, $where_args );

		return self::_update(

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.