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



_maybe_update_plugins ›

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

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.



源码

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