bp_get_activity_comment_id

Return the ID of the activity comment currently being displayed.

Description

(int|bool) bp_get_activity_comment_id(); 

Returns (int|bool)

$comment_id The ID of the activity comment currently being displayed, false if none is found.


Usage

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

Defined (1)

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

/bp-activity/bp-activity-template.php  
  1. function bp_get_activity_comment_id() { 
  2. global $activities_template; 
  3.  
  4. $comment_id = isset( $activities_template->activity->current_comment->id ) ? $activities_template->activity->current_comment->id : false; 
  5.  
  6. /** 
  7. * Filters the ID of the activity comment currently being displayed. 
  8. * @since 1.5.0 
  9. * @param int|bool $comment_id ID for the comment currently being displayed. 
  10. */ 
  11. return apply_filters( 'bp_activity_comment_id', $comment_id );