bp_activity_privacy_register_actions

Register AJAX handlers for a list of actions.

Description

bp_activity_privacy_register_actions(); 

Usage

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

Defined (1)

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

/includes/bp-activity-privacy-ajax.php  
  1. function bp_activity_privacy_register_actions() { 
  2. $actions = array( 
  3. // update filters 
  4. ); 
  5.  
  6. /** 
  7. * Register all of these AJAX handlers 
  8. * The "wp_ajax_" action is used for logged in users, and "wp_ajax_nopriv_" 
  9. * executes for users that aren't logged in. This is for backpat with BP <1.6. 
  10. */ 
  11. foreach( $actions as $name => $function ) { 
  12. add_action( 'wp_ajax_' . $name, $function ); 
  13. add_action( 'wp_ajax_nopriv_' . $name, $function );