On this page
wp_schedule_update_user_counts()
Schedules a recurring recalculation of the total count of users.
Source
File: wp-includes/user.php. View all references
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' );
}
}
Related
Uses
| Uses | Description |
|---|---|
| wp_installing() wp-includes/load.php | Check or set whether WordPress is in “installation” mode. |
| wp_next_scheduled() wp-includes/cron.php | Retrieve the next timestamp for an event. |
| wp_schedule_event() wp-includes/cron.php | Schedules a recurring event. |
| is_main_site() wp-includes/functions.php | Determines whether a site is the main site of the current network. |
Changelog
| Version | Description |
|---|---|
| 6.0.0 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/wp_schedule_update_user_counts