Skip to:
Content

BuddyPress.org

Opened 10 years ago

Closed 10 years ago

#6239 closed enhancement (fixed)

Hook for a custom notification description/link

Reported by: finzend's profile finzend Owned by: boonebgorges's profile boonebgorges
Milestone: 2.3 Priority: normal
Severity: normal Version:
Component: Toolbar & Notifications Keywords:
Cc: finzend@…

Description

Hi,

I want to add a custom notification. So far everything has worked (added a new
setting & component_action, added a new email etc). But there's one thing I cant do. I cannot seem to add a custom description for the notifcation-screen.

I've added my notification under Activities, which uses the bp_activity_format_notifications callback. That callback seems to have no possibility for extension. I could hook into the bp_get_the_notification_description filter (bp_get_the_notification_description), but there's no ID used in the params, so I can't create a specific url.

A workaround would be to register/add a new component (with a custom callback) but that seems a bit overkill, as i want to add a custom notification under Activities.

I would suggest to add three extra parameters for the bp_get_the_notification_description filter:
$notification->component_action, $notification->item_id, $notification->secondary_item_id

Could that be implemented?

Change History (3)

#1 follow-up: @boonebgorges
10 years ago

  • Milestone changed from Awaiting Review to 2.3

How about just passing the $notification object to the filter?

#2 in reply to: ↑ 1 @finzend
10 years ago

  • Cc finzend@… added

Replying to boonebgorges:

How about just passing the $notification object to the filter?

Yes, that would probably be even better;)

#3 @boonebgorges
10 years ago

  • Owner set to boonebgorges
  • Resolution set to fixed
  • Status changed from new to closed

In 9556:

Pass the notification object to the 'bp_get_the_notification_description' filter.

Props finzend.
Fixes #6239.

Note: See TracTickets for help on using tickets.