Uma área de pesquisa sobre o WordPress para devs e autores do tema



_maybe_update_plugins ›

Desde2.7.0
Obsoleton/a
_maybe_update_plugins ( Sem parâmetros )
Acesso:
  • private
Definido em:
Codex:

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

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.



Fonte

function _maybe_update_plugins() {
	$current = get_site_transient( 'update_plugins' );
	if ( isset( $current->last_checked ) && 12 * HOUR_IN_SECONDS > ( time() - $current->last_checked ) ) {
		return;
	}
	wp_update_plugins();
}