bp_acomment_name

Return the author name for the activity comment currently being displayed.

Description

(string) apply_filters( 'bp_acomment_name', (string) $activities_template_activity_current_comment_user_fullname, (unknown) $activities_template_activity_current_comment ); 

The use of the bp_acomment_name filter is deprecated. Please use 'bp_activity_comment_name'.

Returns (string)

$name The full name of the activity comment author.

Parameters (2)

0. $activities_template_activity_current_comment_user_fullname (string)
The activities template activity current comment user fullname.
1. $activities_template_activity_current_comment (unknown)
The activities template activity current comment.

Usage

To run the hook, copy the example below.
  1. $activities_template_activity_current_comment_user_fullname = apply_filters( 'bp_acomment_name', $activities_template_activity_current_comment_user_fullname, $activities_template_activity_current_comment ); 
  2.  
  3. if ( !empty( $activities_template_activity_current_comment_user_fullname ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the bp_acomment_name callback 
  2. function filter_bp_acomment_name( $activities_template_activity_current_comment_user_fullname, $activities_template_activity_current_comment ) { 
  3. // make filter magic happen here... 
  4. return $activities_template_activity_current_comment_user_fullname
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'bp_acomment_name', 'filter_bp_acomment_name', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'bp_acomment_name', 'filter_bp_acomment_name', 10, 2 ); 

Defined (1)

The filter is defined in the following location(s).

/bp-activity/bp-activity-template.php  
  1. $name = apply_filters( 'bp_acomment_name', $activities_template->activity->current_comment->user_fullname, $activities_template->activity->current_comment ); // Backward compatibility.