bp_get_activity_comment_id()
Return the ID of the activity comment currently being displayed.
Description
Return
(int|bool) $comment_id The ID of the activity comment currently being displayed, false if none is found.
Source
File: bp-activity/bp-activity-template.php
function bp_get_activity_comment_id() { global $activities_template; $comment_id = isset( $activities_template->activity->current_comment->id ) ? $activities_template->activity->current_comment->id : false; /** * Filters the ID of the activity comment currently being displayed. * * @since BuddyPress 1.5.0 * * @param int|bool $comment_id ID for the comment currently being displayed. */ return apply_filters( 'bp_activity_comment_id', $comment_id ); }
Changelog
Version | Description |
---|---|
BuddyPress 1.5.0 | Introduced. |
Questions?
We're always happy to help with code or other questions you might have! Search our developer docs, contact support, or connect with our sales team.