bp_activity_privacy_activate

Put setup procedures to be run when the plugin is activated in the following function.

Description

bp_activity_privacy_activate(); 

Usage

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

Defined (1)

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

/loader.php  
  1. function bp_activity_privacy_activate() { 
  2. // check if buddypress is active 
  3. if ( ! defined( 'BP_VERSION' ) ) { 
  4. die( _e( 'You cannot enable BuddyPress Activity Privacy because <strong>BuddyPress</strong> is not active. Please install and activate BuddyPress before trying to activate Buddypress Activity Privacy again.' , 'bp-activity-privacy' ) ); 
  5.  
  6. // Add the transient to redirect 
  7. set_transient( '_bp_activity_privacy_activation_redirect', true, 30 ); 
  8.