wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema



get_current_network_id › WordPress Function

Desde4.6.0
Obsoleton/a
get_current_network_id ( Sem parâmetros )
Retorna:
  • (int) The ID of the current network.
Definido em:
Codex:

Retrieves the current network ID.



Fonte

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