_maybe_update_core
Determines whether core should be updated.
Description
_maybe_update_core();
Usage
if ( !function_exists( '_maybe_update_core' ) ) { require_once ABSPATH . WPINC . '/update.php'; } // NOTICE! Understand what this does before running. $result = _maybe_update_core();
Defined (1)
The function is defined in the following location(s).
- /wp-includes/update.php
- function _maybe_update_core() {
- // include an unmodified $wp_version
- $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;
- }
- }