diff options
Diffstat (limited to 'wp-admin/includes/upgrade.php')
-rw-r--r-- | wp-admin/includes/upgrade.php | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/wp-admin/includes/upgrade.php b/wp-admin/includes/upgrade.php index cb39391..715f5e2 100644 --- a/wp-admin/includes/upgrade.php +++ b/wp-admin/includes/upgrade.php @@ -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(); @@ -147,7 +162,7 @@ if ( ! function_exists( 'wp_install_defaults' ) ) : * * @global wpdb $wpdb WordPress database abstraction object. * @global WP_Rewrite $wp_rewrite WordPress rewrite component. - * @global string $table_prefix + * @global string $table_prefix The database table prefix. * * @param int $user_id User ID. */ |