#3296 closed defect (bug) (fixed)
Pass $activity_obj in bp_activity_get_permalink()
Reported by: | r-a-y | Owned by: | |
---|---|---|---|
Milestone: | 1.5 | Priority: | normal |
Severity: | Version: | 1.5 | |
Component: | Activity | Keywords: | has-patch |
Cc: |
Description
It would be useful to pass the $activity_obj in the "bp_activity_get_permalink" filter so plugin authors can do checks against the activity item to modify the permalink.
Attached patch is against trunk.
Attachments (1)
Change History (7)
#2
@
13 years ago
New rule: No one gets new hooks and filters unless they also write PHPDoc for the function in question :)
#5
@
13 years ago
No. apply_filters_ref_array() differs from apply_filters only in the way that filter arguments are passed. So
apply_filters_ref_array( 'bp_activity_get_permalink', array( $activity_id, &$activity_obj ) );
is the same as
apply_filters( 'bp_activity_get_permalink', $activity_id, &$activity_obj );
Just tested with some filters on my local install and it's working as expected.
Note: See
TracTickets for help on using
tickets.
(In [4553]) Pass activity object to bp_activity_get_permalink filter. Fixes #3296. Props r-a-y