wp_update_network_counts

The timeline below displays how wordpress function wp_update_network_counts has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.1

/**
 * Updates the network-wide counts for the current network.
 *
 * @since 3.1.0
 * @since 4.8.0 The `$network_id` parameter has been added.
 *
 * @param int|null $network_id ID of the network. Default is the current network.
 */
function wp_update_network_counts($network_id = null)
{
    wp_update_network_user_counts($network_id);
    wp_update_network_site_counts($network_id);
}

WordPress Version: 5.1

/**
 * Update the network-wide counts for the current network.
 *
 * @since 3.1.0
 * @since 4.8.0 The `$network_id` parameter has been added.
 *
 * @param int|null $network_id ID of the network. Default is the current network.
 */
function wp_update_network_counts($network_id = null)
{
    wp_update_network_user_counts($network_id);
    wp_update_network_site_counts($network_id);
}

WordPress Version: 4.8

/**
 * Update the network-wide counts for the current network.
 *
 * @since 3.1.0
 * @since 4.8.0 The $network_id parameter has been added.
 *
 * @param int|null $network_id ID of the network. Default is the current network.
 */
function wp_update_network_counts($network_id = null)
{
    wp_update_network_user_counts($network_id);
    wp_update_network_site_counts($network_id);
}

WordPress Version: 3.7

/**
 *  Update the network-wide counts for the current network.
 *
 *  @since 3.1.0
 */
function wp_update_network_counts()
{
    wp_update_network_user_counts();
    wp_update_network_site_counts();
}