Opened 15 years ago
Closed 15 years ago
#2374 closed defect (bug) (fixed)
Pass $comment parameter for "bp_get_member_name" filter
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 1.2.4 | Priority: | minor |
Severity: | Version: | ||
Component: | Activity | Keywords: | has-patch |
Cc: | r-a-y |
Description
In BP 1.2.3, would help if the bp_get_member_name filter on line 578 in bp-activity/bp-activity-templatetags.php passed the $comment variable.
Change:
$content .= '<div class="acomment-meta"><a href="' . bp_core_get_user_domain( $comment->user_id, $comment->user_nicename, $comment->user_login ) . '">' . apply_filters( 'bp_get_member_name', $comment->user_fullname ) . '</a> · ' . sprintf( ( '%s ago', 'buddypress' ), bp_core_time_since( strtotime( $comment->date_recorded ) ) );
to:
$content .= '<div class="acomment-meta"><a href="' . bp_core_get_user_domain( $comment->user_id, $comment->user_nicename, $comment->user_login ) . '">' . apply_filters( 'bp_get_member_name', $comment->user_fullname, $comment ) . '</a> · ' . sprintf( __( '%s ago', 'buddypress' ), bp_core_time_since( strtotime( $comment->date_recorded ) ) );
Attachments (1)
Change History (5)
Note: See
TracTickets for help on using
tickets.
Just found out that the bp_get_member_name filter already exists in the bp_get_member_name() function (on line 254 in bp-core-templatetags.php) and it only accepts one argument.
So one additional change must be made here:
---
I realize this is not the right way to go about this, so instead, I'd like to propose renaming the filter on line 578 in bp-activity/bp-activity-templatetags.php to something like: