_maybe_update_core

Determines whether core should be updated.

Description

_maybe_update_core(); 

Usage

  1. if ( !function_exists( '_maybe_update_core' ) ) { 
  2. require_once ABSPATH . WPINC . '/update.php'; 
  3.  
  4.  
  5. // NOTICE! Understand what this does before running. 
  6. $result = _maybe_update_core(); 
  7.  

Defined (1)

The function is defined in the following location(s).

/wp-includes/update.php  
  1. function _maybe_update_core() { 
  2. // include an unmodified $wp_version 
  3. include( ABSPATH . WPINC . '/version.php' ); 
  4.  
  5. $current = get_site_transient( 'update_core' ); 
  6.  
  7. if ( isset( $current->last_checked, $current->version_checked ) && 
  8. 12 * HOUR_IN_SECONDS > ( time() - $current->last_checked ) && 
  9. $current->version_checked == $wp_version ) { 
  10. return;