bp_get_activity_comment_name

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

Description

(string) bp_get_activity_comment_name(); 

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.


Usage

  1. if ( !function_exists( 'bp_get_activity_comment_name' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-activity/bp-activity-template.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bp_get_activity_comment_name(); 
  7.  

Defined (1)

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

/bp-activity/bp-activity-template.php  
  1. function bp_get_activity_comment_name() { 
  2. global $activities_template; 
  3.  
  4. if ( isset( $activities_template->activity->current_comment->user_fullname ) ) { 
  5.  
  6. $name = apply_filters( 'bp_acomment_name', $activities_template->activity->current_comment->user_fullname, $activities_template->activity->current_comment ); // Backward compatibility. 
  7. } else { 
  8. $name = $activities_template->activity->current_comment->display_name; 
  9.  
  10. /** 
  11. * Filters the name of the author for the activity comment. 
  12. * @since 1.5.0 
  13. * @param string $name Name to be displayed with the activity comment. 
  14. */