Skip to:
Content

BuddyPress.org

Opened 9 years ago

Closed 9 years ago

#7066 closed enhancement (fixed)

Notifications: Pass the notification ID to the notification callback

Reported by: r-a-y's profile r-a-y Owned by: r-a-y's profile 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 9 years ago.

Download all attachments as: .zip

Change History (4)

@r-a-y
9 years ago

#1 @r-a-y
9 years ago

This ticket is basically useless without #7067.

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


9 years ago

#3 @r-a-y
9 years 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.