monsterinsights_network_admin_menu

The Google Analytics for WordPress by MonsterInsights monsterinsights network admin menu function.

Description

monsterinsights_network_admin_menu(); 

Usage

  1. if ( !function_exists( 'monsterinsights_network_admin_menu' ) ) { 
  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_network_admin_menu(); 
  7.  

Defined (1)

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

/includes/admin/admin.php  
  1. function monsterinsights_network_admin_menu() { 
  2. // Get the base class object. 
  3. $base = MonsterInsights(); 
  4.  
  5. // First, let's see if this is an MS network enabled plugin. If it is, we should load the license  
  6. // menu page and the updater on the network panel 
  7. if ( ! function_exists( 'is_plugin_active_for_network' ) ) { 
  8. require_once( ABSPATH . '/wp-admin/includes/plugin.php' ); 
  9.  
  10. $plugin = plugin_basename( MONSTERINSIGHTS_PLUGIN_FILE ); 
  11. if ( ! is_plugin_active_for_network( $plugin ) ) { 
  12. return; 
  13.  
  14. $hook = 'monsterinsights_network'; 
  15. add_menu_page( __( 'Network Settings', 'google-analytics-for-wordpress' ), __( 'Insights', 'google-analytics-for-wordpress' ), 'monsterinsights_save_settings', 'monsterinsights_network', 'monsterinsights_network_page', plugins_url( 'assets/css/images/menu-icon@2x.png', $base->file ), '100.00013467543' ); 
  16.  
  17. add_submenu_page( $hook, __( 'Network Settings', 'google-analytics-for-wordpress' ), __( 'Network Settings', 'google-analytics-for-wordpress' ), 'monsterinsights_save_settings', 'monsterinsights_network', 'monsterinsights_network_page' ); 
  18.  
  19. // then addons 
  20. add_submenu_page( $hook, __( 'Addons:', 'google-analytics-for-wordpress' ), '<span style="color:#7cc048"> ' . __( 'Addons', 'google-analytics-for-wordpress' ) . '</span>', 'monsterinsights_save_settings', 'monsterinsights_addons', 'monsterinsights_addons_page' );