确定是否应更新核心。

原型

_maybe_update_core()

源文件

路径:wp-includes/update.php

<?php
...
function _maybe_update_core() {
	// include an unmodified $wp_version
	include( ABSPATH . WPINC . '/version.php' );
	$current = get_site_transient( 'update_core' );
	if ( isset( $current->last_checked, $current->version_checked ) &&
		12 * HOUR_IN_SECONDS > ( time() - $current->last_checked ) &&
		$current->version_checked == $wp_version ) {
		return;
	}
	wp_version_check();
}
...
?>

其他

英文文档:https://developer.wordpress.org/reference/functions/_maybe_update_core/