Opened 10 years ago
Closed 10 years ago
#6239 closed enhancement (fixed)
Hook for a custom notification description/link
Reported by: | finzend | Owned by: | 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)
#2
in reply to:
↑ 1
@
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;)
How about just passing the
$notification
object to the filter?