_maybe_update_themes()
Checks 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.
Internal function — this function is designed to be used by the kernel itself. It is not recommended to use this function in your code.
No Hooks.
Return
null
. Nothing (null).
Usage
_maybe_update_themes();
Changelog
Since 2.7.0 | Introduced. |
_maybe_update_themes() maybe update themes code WP 6.5.2
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(); }