bp_add_activation_redirect

Redirect user to BP's What's New page on first page load after activation.

Description

bp_add_activation_redirect(); 

Usage

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

Defined (1)

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

/bp-core/bp-core-update.php  
  1. function bp_add_activation_redirect() { 
  2.  
  3. // Bail if activating from network, or bulk. 
  4. if ( isset( $_GET['activate-multi'] ) ) { 
  5. return; 
  6.  
  7. // Record that this is a new installation, so we show the right 
  8. // welcome message. 
  9. if ( bp_is_install() ) { 
  10. set_transient( '_bp_is_new_install', true, 30 ); 
  11.  
  12. // Add the transient to redirect. 
  13. set_transient( '_bp_activation_redirect', true, 30 );