WordPress at a glance
function is not described

is_main_network() WP 3.7.0

Determine whether a network is the main network of the Multisite installation.

No Hooks.

Return

true|false. True if $network_id is the main network, or if not running Multisite.

Usage

is_main_network( $network_id );
$network_id(int)
Network ID to test.
Default: current network

Changelog

Since 3.7.0 Introduced.

Code of is_main_network() WP 5.7

<?php
function is_main_network( $network_id = null ) {
	if ( ! is_multisite() ) {
		return true;
	}

	if ( null === $network_id ) {
		$network_id = get_current_network_id();
	}

	$network_id = (int) $network_id;

	return ( get_main_network_id() === $network_id );
}