WordPress.org

Make WordPress Core

Ticket #36188: 36188.diff

File 36188.diff, 887 bytes (added by seancjones, 5 years ago)
  • src/wp-admin/includes/upgrade.php

     
    9090
    9191        wp_install_maybe_enable_pretty_permalinks();
    9292
    93         flush_rewrite_rules();
    94 
    9593        wp_new_blog_notification($blog_title, $guessurl, $user_id, ($email_password ? $user_password : __('The password you chose during the install.') ) );
    9694
    9795        wp_cache_flush();
     
    105103         */
    106104        do_action( 'wp_install', $user );
    107105
     106        /**
     107         * Fire the init action then flush rewrite rules. Ensures
     108         * settings are fully loaded before the next page load.
     109         *
     110         * @since 4.6.0
     111         */
     112        do_action( 'init' );
     113        flush_rewrite_rules();
     114
    108115        return array('url' => $guessurl, 'user_id' => $user_id, 'password' => $user_password, 'password_message' => $message);
    109116}
    110117endif;