monsterinsights_google_auth_enterkey_view

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

Description

monsterinsights_google_auth_enterkey_view( (constant) $reauth = false, (string) $auth_url = '', (string) $error = '' ); 

Parameters (3)

0. $reauth — Optional. (constant) => false
The reauth.
1. $auth_url — Optional. (string) => ''
The auth url.
2. $error — Optional. (string) => ''
The error.

Usage

  1. if ( !function_exists( 'monsterinsights_google_auth_enterkey_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. // The auth url. 
  8. $auth_url = ''; 
  9.  
  10. // The error. 
  11. $error = ''; 
  12.  
  13. // NOTICE! Understand what this does before running. 
  14. $result = monsterinsights_google_auth_enterkey_view($reauth, $auth_url, $error); 
  15.  

Defined (1)

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

/includes/admin/googleauth.php  
  1. function monsterinsights_google_auth_enterkey_view( $reauth = false, $auth_url = '', $error = '' ) { 
  2. $class = ( $reauth ) ? 'monsterinsights_google_auth_reauth_enterkey_view' : 'monsterinsights_google_auth_enterkey_view' ; 
  3. $auth_url = esc_js( esc_url( $auth_url ) ); 
  4. ob_start();  
  5. ?> 
  6. <div class="<?php echo $class; ?>"> 
  7. <?php if ( $reauth ) { ?> 
  8. <div id="monsterinsights_google_auth_box_header"> 
  9. <div class="monsterinsights_google_auth_box_header_reauth"> 
  10. <?php esc_html_e( 'This process will replace your current Google Analytics connection.', 'google-analytics-for-wordpress' ); ?>  
  11. <a href="" class="monsterinsights_google_auth_box_cancel" title="<?php esc_attr_e( 'Cancel', 'google-analytics-for-wordpress' ); ?>" >  
  12. <?php esc_html_e( 'Cancel', 'google-analytics-for-wordpress' ); ?> 
  13. </a>  
  14. </div> 
  15. </div> 
  16. <?php } ?> 
  17. <div id="monsterinsights_google_auth_box_contents" <?php if ( $reauth ) { echo 'class="monsterinsights_google_auth_reauth"'; } ?> > 
  18. <div class="monsterinsights_google_auth_view_title monsterinsights_google_auth_enterkey_view_title"><?php esc_html_e( 'ENTER GOOGLE CODE', 'google-analytics-for-wordpress' ); ?> </div> 
  19. <a id="monsterinsights-google-oauth-window" class="button" onclick="monsterinsights_popupwindow('<?php echo esc_js( esc_attr( esc_url( $auth_url ) ) ); ?>', 500, 500);"><?php esc_html_e( 'Click To Get Google Code', 'google-analytics-for-wordpress' ); ?> </a> 
  20. <label for="monsterinsights_step_data" class="monsterinsights_google_auth_step_data_label_enterkey_view"><?php esc_html_e( 'Copy the Google code into the box below and click next', 'google-analytics-for-wordpress' ); ?> </label> 
  21. <input type="text" id="monsterinsights_step_data" class="monsterinsights_google_auth_step_data_enterkey_view" name="monsterinsights_step_data" placeholder="<?php esc_html_e( 'Paste Google Code here', 'google-analytics-for-wordpress'); ?>"> 
  22. <input type="hidden" id="monsterinsightsreauth" name="monsterinsightsreauth" value="<?php echo ($reauth) ? 'true' : 'false';?>"> 
  23. <input type="hidden" id="monsterinsightsview" name="monsterinsightsview" value="<?php echo 'enterkey';?>"> 
  24. <?php if ( ! empty( $error ) ) { ?> 
  25. <div class="monsterinsights_google_auth_enterkey_error notice notice-warning" style="margin:0px;padding:0px;"><p><?php esc_html_e( $error ); ?><p></div> 
  26. <?php } ?> 
  27. </div> 
  28. <div id="monsterinsights_google_auth_box_footer"> 
  29. <div id="monsterinsights_google_auth_box_footer_left"> 
  30. <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>  
  31. </div> 
  32. <div id="monsterinsights_google_auth_box_footer_center"> 
  33.   
  34. </div> 
  35. <div id="monsterinsights_google_auth_box_footer_right"> 
  36. <a href="#" id="monsterinsights_google_auth_box_next" class="monsterinsights_google_auth_box_next" title="<?php esc_attr_e( 'Next', 'google-analytics-for-wordpress' ); ?>" > 
  37. <div id="monsterinsights_google_auth_box_footer_right_next"> 
  38. <?php esc_html_e( 'NEXT', 'google-analytics-for-wordpress' ); ?>  
  39. </div> 
  40. </a> 
  41. </div> 
  42. </div> 
  43. </div> 
  44. <?php 
  45. $contents = ob_get_contents(); 
  46. ob_end_clean(); 
  47. return $contents;