Alert: This function’s access is marked private. This means it is not intended for use by plugin or theme developers, only in other core functions. It is listed here for completeness.
_maybe_update_plugins() WordPress Function
The function _maybe_update_plugins() is a conditional function that updates the plugin database if the current user has the capability to do so. This function is only invoked if the user is authenticated and has the 'update_plugins' capability.
_maybe_update_plugins() #
Check the last time plugins were run before checking plugin versions.
Description
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.
Source
File: wp-includes/update.php
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(); }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
2.7.0 | Introduced. |