_maybe_update_plugins

Check the last time plugins were run before checking plugin versions.

Description

_maybe_update_plugins(); 

This might have been backported to WordPress 2.6.1 for performance reasons. This is used for the wp-admin to check only so often instead of every page load.


Usage

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

Defined (1)

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

/wp-includes/update.php  
  1. function _maybe_update_plugins() { 
  2. $current = get_site_transient( 'update_plugins' ); 
  3. if ( isset( $current->last_checked ) && 12 * HOUR_IN_SECONDS > ( time() - $current->last_checked ) ) 
  4. return;