Skip to:
Content

BuddyPress.org

Opened 13 years ago

Closed 12 years ago

#5314 closed enhancement (fixed)

filter for friends notification

Reported by: mpa4hu Owned by: johnjamesjacoby
Priority: normal Milestone: 2.0
Component: Toolbar & Notifications Version:
Severity: normal Keywords:
Cc:

Description

mensions notification has a filter which provides handy variables.

but `friends_format_notifications` does not.
I think it will be good for function to provide `$item_id` and `$format`

Change History (6)

#1 @johnjamesjacoby
13 years ago

  • Component CoreNotifications
  • Milestone Awaiting Review2.0
  • Owner set to johnjamesjacoby
  • Status newassigned

#2 @r-a-y
12 years ago

In 8169:

Friends: Pass $item_id as an argument for notification format filters.

Props mpa4hu

See #5314

#3 @r-a-y
12 years ago

  • Keywords needs-testing added

mpa4hu - I've added the $item_id as an argument for the notification filters.

As for $format, I don't think that variable is necessary.

You can do a check for the format by checking if the notification is an array. If it is an array, then the format is 'array'. If not, then the format is 'string'.

Leaving it open for feedback.

#4 @r-a-y
12 years ago

  • Keywords 2nd-opinion added; needs-testing removed

#5 @mpa4hu
12 years ago

I have not thought about checking array, thanks that works just fine!

#6 @r-a-y
12 years ago

  • Keywords 2nd-opinion removed
  • Resolutionfixed
  • Status assignedclosed

Thanks for confirming. Closing this one!

Note: See TracTickets for help on using tickets.