monsterinsights_network_page

Callback to output the MonsterInsights network page.

Description

monsterinsights_network_page(); 

Usage

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

Defined (1)

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

/includes/admin/pages/network-settings.php  
  1. function monsterinsights_network_page() { 
  2. /**  
  3. * Developer Alert: 
  4. * Per the README, this is considered an internal hook and should 
  5. * not be used by other developers. This hook's behavior may be modified 
  6. * or the hook may be removed at any time, without warning. 
  7. */ 
  8. do_action( 'monsterinsights_head' ); 
  9. $network_license = get_site_option( monsterinsights_license ); 
  10. $license_key = ! empty( $network_license['key'] ) ? esc_attr( $network_license['key'] ) : ''; 
  11. $license_key_type = ! empty( $network_license['type'] ) ? esc_html( $network_license['type'] ) : ''; 
  12. $network_ua_code = get_site_option('monsterinsights_network_manual_ua_code', false ); 
  13. ?> 
  14. <?php echo monsterinsights_ublock_notice(); ?> 
  15. <div id="monsterinsights-settings" class="wrap"> 
  16. <div id="monsterinsights-settings-pages" class="monsterinsights-main-nav-tabs monsterinsights-nav-tabs wrap" data-navigation="#monsterinsights-network-settings-page-main-nav"> 
  17. <div id="monsterinsights-main-tab-general" class="monsterinsights-main-nav-tab monsterinsights-nav-tab monsterinsights-active"> 
  18. <div id="monsterinsights-network-settings-general"> 
  19. <?php  
  20. // Output any notices now 
  21. /**  
  22. * Developer Alert: 
  23. * Per the README, this is considered an internal hook and should 
  24. * not be used by other developers. This hook's behavior may be modified 
  25. * or the hook may be removed at any time, without warning. 
  26. */ 
  27. ?> 
  28. <h1><?php esc_html_e( 'Network Settings', 'google-analytics-for-wordpress'); ?></h1> 
  29. <p><?php esc_html_e( 'Activate your MonsterInsights license key on this panel to hide the license key settings and addon pages for subsites.', 'google-analytics-for-wordpress'); ?></p> 
  30. <table class="form-table"> 
  31. <tbody> 
  32. <?php if ( monsterinsights_is_pro_version() ) : ?> 
  33. <tr id="monsterinsights-settings-key-box"> 
  34. <th scope="row"> 
  35. <label for="monsterinsights-settings-key"><?php esc_html_e( 'License Key', 'google-analytics-for-wordpress' ); ?></label> 
  36. </th> 
  37. <td> 
  38. <form id="monsterinsights-settings-verify-key" method="post"> 
  39. <input type="password" name="monsterinsights-license-key" id="monsterinsights-settings-key" value="<?php echo esc_attr( $license_key ); ?>" /> 
  40. <?php wp_nonce_field( 'monsterinsights-key-nonce', 'monsterinsights-key-nonce' ); ?> 
  41. <?php submit_button( esc_html__( 'Verify Key', 'google-analytics-for-wordpress' ), 'button-action', 'monsterinsights-verify-submit', false ); ?> 
  42. <?php submit_button( esc_html__( 'Deactivate Key', 'google-analytics-for-wordpress' ), 'button-danger', 'monsterinsights-deactivate-submit', false ); ?> 
  43. <p class="description"><?php esc_html_e( 'License key to enable automatic updates for MonsterInsights Pro & addons. Deactivate your license if you want to use it on another WordPress site.', 'google-analytics-for-wordpress' ); ?></p> 
  44. </form> 
  45. </td> 
  46. </tr> 
  47. <?php endif; ?> 
  48. <?php if ( ! empty( $license_key_type ) && monsterinsights_is_pro_version() ) : ?> 
  49. <tr id="monsterinsights-settings-key-type-box"> 
  50. <th scope="row"> 
  51. <label for="monsterinsights-settings-key-type"><?php esc_html_e( 'License Key Type', 'google-analytics-for-wordpress' ); ?></label> 
  52. </th> 
  53. <td> 
  54. <form id="monsterinsights-settings-key-type" method="post"> 
  55. <span class="monsterinsights-license-type"><?php printf( esc_html__( 'Your license key type for this site is %s.', 'google-analytics-for-wordpress' ), '<strong>' . $license_key_type . '</strong>' ); ?> 
  56. <input type="hidden" name="monsterinsights-license-key" value="<?php echo esc_attr( $license_key ); ?>" /> 
  57. <?php wp_nonce_field( 'monsterinsights-key-nonce', 'monsterinsights-key-nonce' ); ?> 
  58. <?php submit_button( esc_html__( 'Refresh Key', 'google-analytics-for-wordpress' ), 'button-action', 'monsterinsights-refresh-submit', false ); ?> 
  59. <p class="description"><?php esc_html_e( 'Your license key type (handles updates and Addons). Click refresh if your license has been upgraded or the type is incorrect.', 'google-analytics-for-wordpress' ); ?></p> 
  60. </form> 
  61. </td> 
  62. </tr> 
  63. <?php endif; ?> 
  64. <tr> 
  65. <form id="monsterinsights-network-general-tab" method="post"> 
  66. <th scope="row"> 
  67. <label for="monsterinsights-google-ua"><?php esc_html_e( 'Network UA code', 'google-analytics-for-wordpress' ); ?></label> 
  68. </th> 
  69. <td> 
  70. <input type="text" id="monsterinsights-network-ua-code" name="network_manual_ua_code" value="<?php echo $network_ua_code; ?>" /><?php submit_button( esc_html__( 'Save Network UA code', 'google-analytics-for-wordpress' ), 'button-action', 'monsterinsights-network-settings-submit', false ); ?> 
  71. <p class="description"><?php esc_html_e( 'This is the default UA code to use for subsites of a network (can be overriden at the single site level).', 'google-analytics-for-wordpress' ); ?></p> 
  72. <?php wp_nonce_field( 'monsterinsights-network-settings-nonce', 'monsterinsights-network-settings-nonce' ); ?> 
  73.  
  74. </td> 
  75. </form> 
  76. </tr> 
  77. </tbody> 
  78. </table> 
  79. </div> 
  80. </div> 
  81. </div> 
  82. </div> 
  83. <?php