bp_activity_format_activity_action_activity_comment

Format 'activity_comment' activity actions.

Description

(string) bp_activity_format_activity_action_activity_comment( (string) $action, (object) $activity ); 

Returns (string)

$action

Parameters (2)

0. $action (string)
Static activity action.
1. $activity (object)
Activity data object.

Usage

  1. if ( !function_exists( 'bp_activity_format_activity_action_activity_comment' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-activity/bp-activity-functions.php'; 
  3.  
  4. // Static activity action. 
  5. $action = ''; 
  6.  
  7. // Activity data object. 
  8. $activity = null; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = bp_activity_format_activity_action_activity_comment($action, $activity); 
  12.  

Defined (1)

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

/bp-activity/bp-activity-functions.php  
  1. function bp_activity_format_activity_action_activity_comment( $action, $activity ) { 
  2. $action = sprintf( __( '%s posted a new activity comment', buddypress ), bp_core_get_userlink( $activity->user_id ) ); 
  3.  
  4. /** 
  5. * Filters the formatted activity action comment string. 
  6. * @since 1.2.0 
  7. * @param string $action Activity action string value. 
  8. * @param BP_Activity_Activity $activity Activity item object. 
  9. */ 
  10. return apply_filters( 'bp_activity_comment_action', $action, $activity );