_maybe_update_core()
Determines whether core should be updated.
Internal function — this function is designed to be used by the kernel itself. It is not recommended to use this function in your code.
No Hooks.
Returns
null. Nothing (null).
Usage
_maybe_update_core();
Changelog
| Since 2.8.0 | Introduced. |
_maybe_update_core() maybe update core code WP 6.9.1
function _maybe_update_core() {
$current = get_site_transient( 'update_core' );
if ( isset( $current->last_checked, $current->version_checked )
&& 12 * HOUR_IN_SECONDS > ( time() - $current->last_checked )
&& wp_get_wp_version() === $current->version_checked
) {
return;
}
wp_version_check();
}