Upgrade/Install: Delay automatic updates after installation.
After installation, the user is directed to the `Log In` page. This triggers the `wp_schedule_update_checks()` function which is hooked to `init` and schedules updates to run immediately if no other events exist. As a result of more robust use of maintenance mode for automatic updates added in [58128], the user may be presented with a maintenance mode screen just after installing WordPress. To improve the user experience, this schedules core updates for 1 hour, plugin updates for 1.5 hours, and theme updates for 2 hours after installation. Follow-up to [58128], [58139], [58308], [58309]. Props afragen, hellofromTonya, peterwilsoncc, nithi22, dd32. Fixes #61457. See #58281, #61391. Built from https://develop.svn.wordpress.org/trunk@58435 git-svn-id: http://core.svn.wordpress.org/trunk@57884 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
6e426b04c1
commit
09848f0151
|
@ -52,6 +52,21 @@ if ( ! function_exists( 'wp_install' ) ) :
|
|||
wp_check_mysql_version();
|
||||
wp_cache_flush();
|
||||
make_db_current_silent();
|
||||
|
||||
/*
|
||||
* Ensure update checks are delayed after installation.
|
||||
*
|
||||
* This prevents users being presented with a maintenance mode screen
|
||||
* immediately after installation.
|
||||
*/
|
||||
wp_unschedule_hook( 'wp_version_check' );
|
||||
wp_unschedule_hook( 'wp_update_plugins' );
|
||||
wp_unschedule_hook( 'wp_update_themes' );
|
||||
|
||||
wp_schedule_event( time() + HOUR_IN_SECONDS, 'twicedaily', 'wp_version_check' );
|
||||
wp_schedule_event( time() + ( 1.5 * HOUR_IN_SECONDS ), 'twicedaily', 'wp_update_plugins' );
|
||||
wp_schedule_event( time() + ( 2 * HOUR_IN_SECONDS ), 'twicedaily', 'wp_update_themes' );
|
||||
|
||||
populate_options();
|
||||
populate_roles();
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.6-beta2-58434';
|
||||
$wp_version = '6.6-beta2-58435';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue