Skip to:
Content

#7066 closed enhancement (fixed)

Notifications: Pass the notification ID to the notification callback

Reported by: r-a-y Owned by: r-a-y
Milestone: 2.6 Priority: normal
Severity: normal Version: 2.3.0
Component: Toolbar & Notifications Keywords: has-patch
Cc:

Description

When formatting notifications in a component, there are some cases where you want to reference the notification ID. This is especially important if you want to grab some notification meta without having to re-query just for the notification ID.

Attachments (1)

7066.01.patch (3.6 KB) - added by r-a-y 20 months ago.

Download all attachments as: .zip

Change History (4)

@r-a-y
20 months ago

#1 @r-a-y
20 months ago

This ticket is basically useless without #7067.

This ticket was mentioned in Slack in #buddypress by mercime. View the logs.


20 months ago

#3 @r-a-y
20 months ago

  • Owner set to r-a-y
  • Resolution set to fixed
  • Status changed from new to closed

In 10790:

Notifications: Pass the notification ID to the notification format callback.

When formatting notifications for a component, there are some cases where
you might want to reference the notification ID.

This is especially important if you want to grab some notification meta
without having to re-query just for the notification ID.

This commit adds the notification ID to our notification format callbacks:

  • For those registered by the BP_Component class ($bp->COMPONENT->notification_callback)
  • For non-BP components via the 'bp_notifications_get_notifications_for_user' filter.

Fixes #7066.

Note: See TracTickets for help on using tickets.