File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -322,6 +322,13 @@ body.language-chooser {
322322 max-width : 300px ;
323323}
324324
325+ .language-chooser [for = "language" ] {
326+ display : inline-block;
327+ margin-bottom : 10px ;
328+ font-size : 14px ;
329+ font-weight : 600 ;
330+ }
331+
325332.language-chooser select {
326333 padding : 8px ;
327334 width : 100% ;
Original file line number Diff line number Diff line change @@ -205,7 +205,7 @@ function wp_install_language_form( $languages ) {
205205
206206 $ installed_languages = get_available_languages ();
207207
208- echo "<label class='screen-reader-text' for='language'>Select a default language</label> \n" ;
208+ echo "<label for='language'>Select a default language</label> \n" ;
209209 echo "<select size='14' name='language' id='language'> \n" ;
210210 echo '<option value="" lang="en" selected="selected" data-continue="Continue" data-installed="1">English (United States)</option> ' ;
211211 echo "\n" ;
Original file line number Diff line number Diff line change 1010if ( false ) {
1111 ?>
1212<!DOCTYPE html>
13- <html>
13+ <html lang="en-US" >
1414<head>
1515 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
1616 <title>Error: PHP is not running</title>
Original file line number Diff line number Diff line change @@ -95,16 +95,15 @@ function setup_config_display_header( $body_classes = array() ) {
9595 $ body_classes = (array ) $ body_classes ;
9696 $ body_classes [] = 'wp-core-ui ' ;
9797 $ body_classes [] = 'admin-color-modern ' ;
98- $ dir_attr = '' ;
98+
9999 if ( is_rtl () ) {
100100 $ body_classes [] = 'rtl ' ;
101- $ dir_attr = ' dir="rtl" ' ;
102101 }
103102
104103 header ( 'Content-Type: text/html; charset=utf-8 ' );
105104 ?>
106105<!DOCTYPE html>
107- <html<?php echo $ dir_attr ; ?> >
106+ <html <?php language_attributes () ; ?> >
108107<head>
109108 <meta name="viewport" content="width=device-width, initial-scale=1.0" />
110109 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
@@ -134,7 +133,7 @@ function setup_config_display_header( $body_classes = array() ) {
134133 $ languages = wp_get_available_translations ();
135134 if ( $ languages ) {
136135 setup_config_display_header ( 'language-chooser ' );
137- echo '<h1 class="screen-reader-text">Select a default language </h1> ' ;
136+ echo '<h1 class="screen-reader-text">Welcome to WordPress </h1> ' ;
138137 echo '<form id="setup" method="post" action="?step=0"> ' ;
139138 wp_install_language_form ( $ languages );
140139 echo '</form> ' ;
Original file line number Diff line number Diff line change @@ -4546,13 +4546,16 @@ function get_language_attributes( $doctype = 'html' ) {
45464546 $ attributes [] = 'dir="rtl" ' ;
45474547 }
45484548
4549- $ lang = get_bloginfo ( 'language ' );
4549+ $ lang = get_bloginfo ( 'language ' );
4550+ $ html_type = get_option ( 'html_type ' );
4551+
45504552 if ( $ lang ) {
4551- if ( 'text/html ' === get_option ( ' html_type ' ) || 'html ' === $ doctype ) {
4553+ if ( 'text/html ' === $ html_type || 'html ' === $ doctype ) {
45524554 $ attributes [] = 'lang=" ' . esc_attr ( $ lang ) . '" ' ;
45534555 }
45544556
4555- if ( 'text/html ' !== get_option ( 'html_type ' ) || 'xhtml ' === $ doctype ) {
4557+ // The $html_type option may be false on a new install on the setup-config.php page.
4558+ if ( ( $ html_type && 'text/html ' !== $ html_type ) || 'xhtml ' === $ doctype ) {
45564559 $ attributes [] = 'xml:lang=" ' . esc_attr ( $ lang ) . '" ' ;
45574560 }
45584561 }
You can’t perform that action at this time.
0 commit comments