wp_schedule_update_network_counts() WordPress Function

The wp_schedule_update_network_counts function is a function that enables a network administrator to update the count of sites and users on their network. This function is useful for keeping track of how many sites and users are on a network, and for determining when a network might need to be upgraded.

wp_schedule_update_network_counts() #

Schedules update of the network-wide counts for the current network.


Source

File: wp-includes/ms-functions.php

function wp_schedule_update_network_counts() {
	if ( ! is_main_site() ) {
		return;
	}

	if ( ! wp_next_scheduled( 'update_network_counts' ) && ! wp_installing() ) {
		wp_schedule_event( time(), 'twicedaily', 'update_network_counts' );
	}
}


Top ↑

Changelog

Changelog
VersionDescription
3.1.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More