[buddypress-trac] [BuddyPress Trac] #6630: Issue posting comment on links using buddypress
buddypress-trac
noreply at wordpress.org
Thu Oct 8 14:31:20 UTC 2015
#6630: Issue posting comment on links using buddypress
-------------------------------------+-----------------------
Reporter: camaro4d | Owner:
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 2.4
Component: Component - Activity | Version: 1.7
Severity: normal | Resolution:
Keywords: needs-testing has-patch |
-------------------------------------+-----------------------
Comment (by MrMaz):
This is how I implemented backwards compat. Leave the filter function args
blank, and use `list()` to get the args. Make sure `add_filter()` allows 4
args.
{{{
function my_activity_custom_update() {
if ( func_num_args() === 4 ) {
list( $activity_id, $object, $item_id, $content ) =
func_get_args();
} else {
$activity_id = false;
list( $object, $item_id, $content ) = func_get_args();
}
// create custom activity item
$my_activity_id = my_create_custom_activity( $activity_id );
return $my_activity_id;
}
add_filter( 'bp_activity_custom_update', 'my_activity_custom_update', 10,
4 );
}}}
--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/6630#comment:10>
BuddyPress Trac <http://buddypress.org/>
BuddyPress Trac
More information about the buddypress-trac
mailing list