#3296 closed defect (bug) (fixed)
Pass $activity_obj in bp_activity_get_permalink()
| Reported by: | r-a-y | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.5 |
| Component: | Activity | Version: | 1.5 |
| Severity: | 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
@
15 years ago
New rule: No one gets new hooks and filters unless they also write PHPDoc for the function in question :)
#5
@
15 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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
(In [4553]) Pass activity object to bp_activity_get_permalink filter. Fixes #3296. Props r-a-y