WordPress开发者和主题制作者的搜索引擎



_maybe_update_themes ›

Since2.7.0
已弃用n/a
_maybe_update_themes ( 没有参数 )
访问:
  • private
定义在:
文档:

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.



源码

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();
}