monsterinsights_settings_tracking_tab

Callback for displaying the UI for general settings tab.

Description

monsterinsights_settings_tracking_tab(); 

Usage

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

Defined (1)

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

/includes/admin/settings/tab-tracking.php  
  1. function monsterinsights_settings_tracking_tab() { 
  2. // Get settings 
  3. ?> 
  4. <div id="monsterinsights-settings-tracking" class="monsterinsights-sub-nav-area"> 
  5. <!-- Tabs --> 
  6. <h1 id="monsterinsights-settings-page-sub-nav" class="monsterinsights-sub-nav-container monsterinsights-nav-container" data-container="#monsterinsights-settings-sub-pages"> 
  7. <?php  
  8. $i = 0; 
  9. $class = ''; 
  10. foreach ( (array) monsterinsights_get_settings_tabs() as $id => $item ) { 
  11. if ( isset( $item['comingsoon'] ) && $item['comingsoon'] || empty( $item['title'] ) ) { 
  12. continue; 
  13. $class = ( 0 === $i ? 'monsterinsights-active' : '' );  
  14. $upgrade_span = ! $is_pro && $item['level'] !== 'lite' ? '<span class="monsterinsights-upgrade-menu-icon">' . esc_html__( 'Upgrade', 'google-analytics-for-wordpress' ) . '</span>' : ''; 
  15. ?> 
  16. <a class="monsterinsights-sub-nav-item monsterinsights-nav-item monsterinsights-active monstericon-<?php echo esc_attr( $id ); ?> <?php echo esc_attr( $class ); ?>" href="#monsterinsights-main-tab-tracking?monsterinsights-sub-tab-<?php echo esc_attr( $id ); ?>" title="<?php echo esc_attr( $item['title'] ); ?>"> 
  17. <?php echo esc_html( $item['title'] ) . $upgrade_span; ?> 
  18. </a> 
  19. <?php  
  20. $i++;  
  21. ?> 
  22. </h1> 
  23.  
  24. <h1 class="monsterinsights-hideme"></h1><!-- sowpnotices are below the nav bar --> 
  25.  
  26. <?php  
  27. // Output any notices now 
  28. /**  
  29. * Developer Alert: 
  30. * Per the README, this is considered an internal hook and should 
  31. * not be used by other developers. This hook's behavior may be modified 
  32. * or the hook may be removed at any time, without warning. 
  33. */ 
  34. ?> 
  35.  
  36. <!-- Tab Panels --> 
  37. <div id="monsterinsights-settings-sub-pages" class="monsterinsights-sub-nav-tabs monsterinsights-nav-tabs" data-navigation="#monsterinsights-settings-page-sub-nav"> 
  38. <?php  
  39. $i = 0;  
  40. foreach ( (array) monsterinsights_get_settings_tabs() as $id => $item ) { 
  41. if ( isset( $item['comingsoon'] ) && $item['comingsoon'] || empty( $item['title'] ) ) { 
  42. continue; 
  43. $class = ( 0 === $i ? ' monsterinsights-active' : '' );  
  44. ?> 
  45. <div id="monsterinsights-sub-tab-<?php echo esc_attr( $id ); ?>" class="monsterinsights-sub-nav-tab monsterinsights-nav-tab<?php echo esc_attr( $class ); ?>"> 
  46. <?php echo '<h2 class="monsterinsights-sub-tab-header">' . esc_html( $item['title'] ) . '</h2>'; ?> 
  47. <div class="monsterinsights-subtab-settings-notices"> 
  48. <?php  
  49. // Output any notices now 
  50. /**  
  51. * Developer Alert: 
  52. * Per the README, this is considered an internal hook and should 
  53. * not be used by other developers. This hook's behavior may be modified 
  54. * or the hook may be removed at any time, without warning. 
  55. */ 
  56. ?> 
  57. </div> 
  58. <!-- Settings Form --> 
  59. <form id="monsterinsights-tracking-<?php echo esc_attr( $id );?>-tab" method="post"> 
  60. <table class="form-table"> 
  61. <tbody> 
  62. <?php 
  63. //do_action( 'monsterinsights_settings_tab_top_' . $id ); 
  64. echo monsterinsights_get_section_settings( $id, 'tracking' ); 
  65. //do_action( 'monsterinsights_settings_tab_bottom_' . $id ); 
  66. ?> 
  67. </tbody> 
  68. </table> 
  69. <?php echo monsterinsights_render_submit_field( $id, 'tracking' ); ?> 
  70. </form> 
  71. </div> 
  72. <?php 
  73. $i++; 
  74. ?> 
  75. </div> 
  76. </div> 
  77. <?php