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

1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
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

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.