monsterinsights_google_auth_start_view

The Google Analytics for WordPress by MonsterInsights monsterinsights google auth start view function.

Description

monsterinsights_google_auth_start_view( (bool) $reauth = false ); 

Parameters (1)

0. $reauth — Optional. (bool) => false
The reauth.

Usage

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

Defined (1)

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

/includes/admin/googleauth.php  
  1. function monsterinsights_google_auth_start_view( $reauth = false ) { 
  2. $class = ( $reauth ) ? 'monsterinsights_google_auth_reauth_start_view' : 'monsterinsights_google_auth_start_view' ; 
  3. ob_start();  
  4. ?> 
  5. <div class="<?php echo $class; ?>"> 
  6. <?php if ( $reauth ) { ?> 
  7. <div id="monsterinsights_google_auth_box_header"> 
  8. <div class="monsterinsights_google_auth_box_header_reauth"> 
  9. <?php esc_html_e( 'This process will replace your current Google Analytics connection.', 'google-analytics-for-wordpress' ); ?>  
  10. <a href="" class="monsterinsights_google_auth_box_cancel" title="<?php esc_attr_e( 'Cancel', 'google-analytics-for-wordpress' ); ?>" >  
  11. <?php esc_html_e( 'Cancel', 'google-analytics-for-wordpress' ); ?> 
  12. </a>  
  13. </div> 
  14. </div> 
  15. <?php } ?> 
  16. <div id="monsterinsights_google_auth_box_contents" <?php if ( $reauth ) { echo 'class="monsterinsights_google_auth_reauth"'; } ?> > 
  17. <?php if ( $reauth ) { ?> 
  18. <div class="monsterinsights_google_auth_view_title monsterinsights_google_auth_start_view_title"><?php esc_html_e( 'RE-AUTHENTICATE', 'google-analytics-for-wordpress' ); ?> </div> 
  19. <div class="monsterinsights_google_auth_view_description monsterinsights_google_auth_start_view_description"><?php esc_html_e( 'Re-authenticate your Google Analytics account with MonsterInsights', 'google-analytics-for-wordpress' ); ?> </div> 
  20. <?php } else { ?> 
  21. <div class="monsterinsights_google_auth_view_title monsterinsights_google_auth_view_title monsterinsights_google_auth_start_view_title"><?php esc_html_e( 'AUTHENTICATION', 'google-analytics-for-wordpress' ); ?> </div> 
  22. <div class="monsterinsights_google_auth_view_description monsterinsights_google_auth_start_view_description"><?php esc_html_e( 'Authenticate your Google Analytics account with MonsterInsights', 'google-analytics-for-wordpress' ); ?> </div> 
  23. <?php } ?> 
  24. <input type="hidden" id="monsterinsightsreauth" name="monsterinsightsreauth" value="<?php echo ( $reauth ) ? 'true' : 'false';?>"> 
  25. <input type="hidden" id="monsterinsightsview" name="monsterinsightsview" value="<?php echo 'start';?>"> 
  26. </div> 
  27. <div id="monsterinsights_google_auth_box_footer"> 
  28. <div id="monsterinsights_google_auth_box_footer_left"> 
  29. <a href="#" class="monsterinsights_google_auth_box_cancel" title="<?php esc_attr_e( 'Cancel', 'google-analytics-for-wordpress' ); ?>" > <?php esc_html_e( 'CANCEL', 'google-analytics-for-wordpress' ); ?></a>  
  30. </div> 
  31. <div id="monsterinsights_google_auth_box_footer_center"> 
  32.   
  33. </div> 
  34. <div id="monsterinsights_google_auth_box_footer_right"> 
  35. <a href="#" id="monsterinsights_google_auth_box_next" class="monsterinsights_google_auth_box_next" title="<?php esc_attr_e( 'Next', 'google-analytics-for-wordpress' ); ?>" > 
  36. <div id="monsterinsights_google_auth_box_footer_right_next"> 
  37. <?php esc_html_e( 'NEXT', 'google-analytics-for-wordpress' ); ?>  
  38. </div> 
  39. </a> 
  40. </div> 
  41. </div> 
  42. </div> 
  43. <?php 
  44. $contents = ob_get_contents(); 
  45. ob_end_clean(); 
  46. return $contents;