bp_activity_current_comment

Utility function that returns the comment currently being recursed.

Description

(object|bool) bp_activity_current_comment(); 

Returns (object|bool)

$current_comment The activity comment currently being displayed. False on failure.


Usage

  1. if ( !function_exists( 'bp_activity_current_comment' ) ) { 
  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_activity_current_comment(); 
  7.  

Defined (1)

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

/bp-activity/bp-activity-template.php  
  1. function bp_activity_current_comment() { 
  2. global $activities_template; 
  3.  
  4. $current_comment = !empty( $activities_template->activity->current_comment ) 
  5. ? $activities_template->activity->current_comment 
  6. : false; 
  7.  
  8. /** 
  9. * Filters the current comment being recursed. 
  10. * @since 1.5.0 
  11. * @param object|bool $current_comment The activity comment currently being displayed. False on failure. 
  12. */ 
  13. return apply_filters( 'bp_activity_current_comment', $current_comment );