wpseek.com
Un motore di ricerca WordPress per sviluppatori e autori di temi



get_current_network_id › WordPress Function

Da4.6.0
Deprecaton/a
get_current_network_id ( Nessun parametro )
Ritorna:
  • (int) The ID of the current network.
Definito a:
Codex:

Retrieves the current network ID.



Sorgenti

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 );
}