bp_blogs_setup_comment_loop_globals_on_ajax()
Set up some globals used in the activity comment loop when AJAX is used.
Description
See also
Source
File: bp-blogs/bp-blogs-activity.php
function bp_blogs_setup_comment_loop_globals_on_ajax() {
// Not AJAX? stop now!
if ( ! defined( 'DOING_AJAX' ) ) {
return;
}
if ( false === (bool) constant( 'DOING_AJAX' ) ) {
return;
}
// Get the parent activity item.
$comment = bp_activity_current_comment();
$parent_activity = new BP_Activity_Activity( $comment->item_id );
// Setup the globals.
bp_blogs_setup_activity_loop_globals( $parent_activity );
}
Changelog
| Version | Description |
|---|---|
| BuddyPress 2.0.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.