Function: wp_maybe_update_network_site_counts

wp_maybe_update_network_site_counts( integer | null $network_id )

Update the count of sites for the current network.

If enabled through the \'enable_live_network_counts' filter, update the sites count on a network when a site is created or its status is updated.

Parameters

Name Type(s) Default Value Description
$network_id integer | null null

ID of the network. Default is the current network.

WordPress Developer Newsletter

Stay on top of the latest WordPress API changes, developer tool updates, security alerts and more.