bp_do_activation_redirect

Redirect user to BuddyPress's What's New page on activation.

Description

bp_do_activation_redirect(); 

Usage

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

Defined (1)

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

/bp-core/admin/bp-core-admin-functions.php  
  1. function bp_do_activation_redirect() { 
  2.  
  3. // Bail if no activation redirect. 
  4. if ( ! get_transient( '_bp_activation_redirect' ) ) { 
  5. return; 
  6.  
  7. // Delete the redirect transient. 
  8. delete_transient( '_bp_activation_redirect' ); 
  9.  
  10. // Bail if activating from network, or bulk. 
  11. if ( isset( $_GET['activate-multi'] ) ) { 
  12. return; 
  13.  
  14. $query_args = array( 'page' => 'bp-about' ); 
  15. if ( get_transient( '_bp_is_new_install' ) ) { 
  16. $query_args['is_new_install'] = '1'; 
  17. delete_transient( '_bp_is_new_install' ); 
  18.  
  19. // Redirect to BuddyPress about page. 
  20. wp_safe_redirect( add_query_arg( $query_args, bp_get_admin_url( 'index.php' ) ) );