public_html/wp-content/plugins/wp-statistics/wp-statistics.php
// This function adds the primary menu to WordPress network.
This function adds the primary menu to WordPress network.
This function adds the primary menu to WordPress network .
function wp_statistics_networkmenu() {
		GLOBAL $WP_Statistics;
		$read_cap = wp_statistics_validate_capability( $WP_Statistics->get_option( 'read_capability', 'manage_options' ) );
		$manage_cap = wp_statistics_validate_capability( $WP_Statistics->get_option( 'manage_capability', 'manage_options' ) );
		add_menu_page( __('Statistics', 'wp_statistics'), __('Statistics', 'wp_statistics'), $read_cap, __FILE__, 'wp_statistics_network_overview' );
		add_submenu_page( __FILE__, __( 'Overview', 'wp_statistics' ), __( 'Overview', 'wp_statistics' ), $read_cap, __FILE__, 'wp_statistics_network_overview' );
		$count = 0;
		$sites = $WP_Statistics->get_wp_sites_list();
		foreach( $sites as $blog_id ) {
			$details = get_blog_details( $blog_id );
			add_submenu_page( __FILE__, $details->blogname, $details->blogname, $manage_cap, 'wp_statistics_blogid_' . $blog_id, 'wp_statistics_goto_network_blog' );
			$count++;
			if( $count > 15 ) { break; }
		}
		if( $WP_Statistics->get_option( 'delete_manual' ) != true ) {
			add_submenu_page( __FILE__, '', '', $read_cap, 'wps_break_menu', 'wp_statistics_log_overview');
			add_submenu_page( __FILE__, __( 'Manual', 'wp_statistics' ), __( 'Manual', 'wp_statistics' ), $manage_cap, WP_STATISTICS_MANUAL_PAGE, 'wp_statistics_manual' );
		}
	}
function wp_statistics_networkmenu ( ) { GLOBAL $ WP_Statistics ; $ read_cap = wp_statistics_validate_capability ( $ WP_Statistics -> get_option ( 'read_capability' , 'manage_options' ) ) ; $ manage_cap = wp_statistics_validate_capability ( $ WP_Statistics -> get_option ( 'manage_capability' , 'manage_options' ) ) ; add_menu_page ( __ ( 'Statistics' , 'wp_statistics' ) , __ ( 'Statistics' , 'wp_statistics' ) , $ read_cap , __FILE__ , 'wp_statistics_network_overview' ) ; add_submenu_page ( __FILE__ , __ ( 'Overview' , 'wp_statistics' ) , __ ( 'Overview' , 'wp_statistics' ) , $ read_cap , __FILE__ , 'wp_statistics_network_overview' ) ; $ count = 0 ; $ sites = $ WP_Statistics -> get_wp_sites_list ( ) ; foreach ( $ sites as $ blog_id ) { $ details = get_blog_details ( $ blog_id ) ; add_submenu_page ( __FILE__ , $ details -> blogname , $ details -> blogname , $ manage_cap , 'wp_statistics_blogid_' . $ blog_id , 'wp_statistics_goto_network_blog' ) ; $ count ++ ; if ( $ count > 15 ) { break ; } } if ( $ WP_Statistics -> get_option ( 'delete_manual' ) != true ) { add_submenu_page ( __FILE__ , '' , '' , $ read_cap , 'wps_break_menu' , 'wp_statistics_log_overview' ) ; add_submenu_page ( __FILE__ , __ ( 'Manual' , 'wp_statistics' ) , __ ( 'Manual' , 'wp_statistics' ) , $ manage_cap , WP_STATISTICS_MANUAL_PAGE , 'wp_statistics_manual' ) ; } }
This function adds the primary menu to WordPress network.
This function adds the primary menu to WordPress network .
// Get the read/write capabilities required to view/manage the plugin as set by the user. // Add the top level menu. // Add the sub items. // Only add the manual entry if it hasn't been deleted.