bp_blogs_setup_comment_loop_globals_on_ajax

Set up some globals used in the activity comment loop when AJAX is used.

Description

bp_blogs_setup_comment_loop_globals_on_ajax(); 

Usage

  1. if ( !function_exists( 'bp_blogs_setup_comment_loop_globals_on_ajax' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'buddypress/bp-blogs/bp-blogs-activity.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = bp_blogs_setup_comment_loop_globals_on_ajax(); 
  7.  

Defined (1)

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

/bp-blogs/bp-blogs-activity.php  
  1. function bp_blogs_setup_comment_loop_globals_on_ajax() { 
  2. // Not AJAX? stop now! 
  3. if ( ! defined( 'DOING_AJAX' ) ) { 
  4. return; 
  5. if ( false === (bool) constant( 'DOING_AJAX' ) ) { 
  6. return; 
  7.  
  8. // Get the parent activity item. 
  9. $parent_activity = new BP_Activity_Activity( $comment->item_id ); 
  10.  
  11. // Setup the globals. 
  12. bp_blogs_setup_activity_loop_globals( $parent_activity );