Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren



_maybe_update_themes ›

Seit2.7.0
Veraltetn/v
_maybe_update_themes ( Keine Parameter )
Zugriff:
  • private
Definiert in:
Codex:

Check themes versions only after a duration of time.

This is for performance reasons to make sure that on the theme version checker is not run on every page load.



Quellcode

function _maybe_update_themes() {
	$current = get_site_transient( 'update_themes' );
	if ( isset( $current->last_checked ) && 12 * HOUR_IN_SECONDS > ( time() - $current->last_checked ) ) {
		return;
	}
	wp_update_themes();
}