From c9d7fb9b28a7bce4164c748afe84b2d54c2b7e96 Mon Sep 17 00:00:00 2001 From: Dominik Schilling Date: Tue, 5 Jan 2016 16:42:29 +0000 Subject: [PATCH] Install: Only enqueue scripts when necessary. Props flixos90 for initial patch. Fixes #34700. Built from https://develop.svn.wordpress.org/trunk@36176 git-svn-id: http://core.svn.wordpress.org/trunk@36143 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/install.php | 21 +++++++++++++++------ wp-includes/version.php | 2 +- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/wp-admin/install.php b/wp-admin/install.php index 0e30ec0c91..ec8a853c8e 100644 --- a/wp-admin/install.php +++ b/wp-admin/install.php @@ -261,10 +261,12 @@ if ( ! empty( $_REQUEST['language'] ) ) { $language = $GLOBALS['wp_local_package']; } +$scripts_to_print = array( 'jquery' ); + switch($step) { case 0: // Step 0 - if ( wp_can_install_language_pack() && empty( $language ) && ( $languages = wp_get_available_translations() ) ) { + $scripts_to_print[] = 'language-chooser'; display_header( 'language-chooser' ); echo '
'; wp_install_language_form( $languages ); @@ -283,6 +285,8 @@ switch($step) { } } + $scripts_to_print[] = 'user-profile'; + display_header(); ?>

@@ -305,6 +309,8 @@ switch($step) { if ( ! empty( $wpdb->error ) ) wp_die( $wpdb->error->get_error_message() ); + $scripts_to_print[] = 'user-profile'; + display_header(); // Fill in the data we gathered $weblog_title = isset( $_POST['weblog_title'] ) ? trim( wp_unslash( $_POST['weblog_title'] ) ) : ''; @@ -368,12 +374,15 @@ switch($step) { } break; } -if ( !wp_is_mobile() ) { -?> + +if ( ! wp_is_mobile() ) { + ?> - - - +