bp_die_legacy_ajax_callbacks

The BuddyPress bp die legacy ajax callbacks function.

Description

bp_die_legacy_ajax_callbacks(); 

Usage

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

Defined (1)

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

/bp-core/deprecated/1.6.php  
  1. function bp_die_legacy_ajax_callbacks() { 
  2.  
  3. // This is a list of the BP wp_ajax_ hook suffixes whose associated functions did 
  4. // not die properly before BP 1.6 
  5. $actions = array( 
  6. // Directory template loaders 
  7. 'members_filter',  
  8. 'groups_filter',  
  9. 'blogs_filter',  
  10. 'forums_filter',  
  11. 'messages_filter',  
  12.  
  13. // Activity 
  14. 'activity_widget_filter',  
  15. 'activity_get_older_updates',  
  16. 'post_update',  
  17. 'new_activity_comment',  
  18. 'delete_activity',  
  19. 'delete_activity_comment',  
  20. 'spam_activity',  
  21. 'spam_activity_comment',  
  22. 'activity_mark_fav',  
  23. 'activity_mark_unfav',  
  24.  
  25. // Groups 
  26. 'joinleave_group',  
  27.  
  28. // Members 
  29. 'addremove_friend',  
  30. 'accept_friendship',  
  31. 'reject_friendship',  
  32.  
  33. // Messages 
  34. 'messages_close_notice',  
  35. 'messages_send_reply',  
  36. 'messages_markunread',  
  37. 'messages_markread',  
  38. 'messages_delete',  
  39. 'messages_autocomplete_results' 
  40. ); 
  41.  
  42. // For each of the problematic hooks, exit at the very end of execution 
  43. foreach( $actions as $action ) { 
  44. add_action( 'wp_ajax_' . $action, create_function( '', 'exit;' ), 9999 ); 
  45. add_action( 'wp_ajax_nopriv_' . $action, create_function( '', 'exit;' ), 9999 );