monsterinsights_welcome_redirect

The Google Analytics for WordPress by MonsterInsights monsterinsights welcome redirect function.

Description

monsterinsights_welcome_redirect(); 

Usage

  1. if ( !function_exists( 'monsterinsights_welcome_redirect' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'google-analytics-for-wordpress-by-monsterinsights/includes/admin/admin.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = monsterinsights_welcome_redirect(); 
  7.  

Defined (1)

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

/includes/admin/admin.php  
  1. function monsterinsights_welcome_redirect() { 
  2. // Bail if no activation redirect 
  3. if ( ! get_transient( '_monsterinsights_activation_redirect' ) ) { 
  4. return; 
  5.  
  6. // Delete the redirect transient 
  7. delete_transient( '_monsterinsights_activation_redirect' ); 
  8.  
  9. // Bail if activating from network, or bulk 
  10. if ( is_network_admin() || isset( $_GET['activate-multi'] ) ) { 
  11. return; 
  12.  
  13. $upgrade = get_option( 'monsterinsights_version_upgraded_from' ); 
  14. if( ! $upgrade ) { // First time install 
  15. //wp_safe_redirect( admin_url( 'admin.php?page=monsterinsights_settings#monsterinsights-main-tab-general' ) ); exit; 
  16. } else { // Update 
  17. return; 
  18. //wp_safe_redirect( admin_url( 'admin.php?page=monsterinsights_settings#monsterinsights-main-tab-general' ) ); exit;