wp_schedule_update_user_counts() WordPress Function

The wp_schedule_update_user_counts() function schedules a user count update job. This function is called when a new user is registered or when a user is deleted.

wp_schedule_update_user_counts() #

Schedules a recurring recalculation of the total count of users.


Source

File: wp-includes/user.php

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

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


Top ↑

Changelog

Changelog
VersionDescription
6.0.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