wpseek.com
Bazujące na WordPress narzędzie wyszukiwania dla deweloperów i twórców motywów.



get_current_network_id › WordPress Function

Od4.6.0
Przestarzałyn/a
get_current_network_id ( Brak parametrów )
Powrót:
  • (int) The ID of the current network.
Zdefiniowane na:
Codex:

Retrieves the current network ID.



Źródło

function get_current_network_id() {
	if ( ! is_multisite() ) {
		return 1;
	}

	$current_network = get_network();

	if ( ! isset( $current_network->id ) ) {
		return get_main_network_id();
	}

	return absint( $current_network->id );
}