bbp_do_activation_redirect

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

Description

bbp_do_activation_redirect(); 

Usage

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

Defined (1)

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

/includes/admin/functions.php  
  1. function bbp_do_activation_redirect() { 
  2.  
  3. // Bail if no activation redirect 
  4. if ( ! get_transient( '_bbp_activation_redirect' ) ) { 
  5. return; 
  6.  
  7. // Delete the redirect transient 
  8. delete_transient( '_bbp_activation_redirect' ); 
  9.  
  10. // Bail if activating from network, or bulk 
  11. if ( is_network_admin() || isset( $_GET['activate-multi'] ) ) { 
  12. return; 
  13.  
  14. // Bail if the current user cannot see the about page 
  15. if ( ! current_user_can( 'bbp_about_page' ) ) { 
  16. return; 
  17.  
  18. // Redirect to bbPress about page 
  19. wp_safe_redirect( add_query_arg( array( 'page' => 'bbp-about' ), admin_url( 'index.php' ) ) );