Narrower screen when choosing a language. see #28577.

git-svn-id: https://develop.svn.wordpress.org/trunk@28780 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Nacin 2014-06-19 04:46:40 +00:00
parent aa6ef01298
commit e27b672b22
2 changed files with 14 additions and 6 deletions

View File

@ -312,6 +312,10 @@ body.rtl,
}
body.language-chooser {
max-width: 450px;
}
.language-chooser select {
margin: 1px;
padding: 8px;
@ -338,7 +342,7 @@ body.rtl,
box-shadow: 0 0 2px rgba(30,140,190,0.8);
}
.wp-core-ui .language-chooser .button.button-hero {
.wp-core-ui.language-chooser .button.button-hero {
font-size: 30px;
line-height: 30px;
}

View File

@ -70,8 +70,14 @@ function wp_get_available_translations() {
*
* @since 2.5.0
*/
function display_header() {
function display_header( $body_classes = '' ) {
header( 'Content-Type: text/html; charset=utf-8' );
if ( is_rtl() ) {
$body_classes .= 'rtl';
}
if ( $body_classes ) {
$body_classes = ' ' . $body_classes;
}
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
@ -83,7 +89,7 @@ function display_header() {
wp_admin_css( 'install', true );
?>
</head>
<body class="wp-core-ui<?php if ( is_rtl() ) echo ' rtl'; ?>">
<body class="wp-core-ui<?php echo $body_classes ?>">
<h1 id="logo"><a href="<?php echo esc_url( __( 'https://wordpress.org/' ) ); ?>"><?php _e( 'WordPress' ); ?></a></h1>
<?php
@ -195,10 +201,9 @@ if ( ! is_string( $wpdb->base_prefix ) || '' === $wpdb->base_prefix ) {
switch($step) {
case 0: // Step 0
if ( $body = wp_get_available_translations() ) {
display_header();
display_header( 'language-chooser' );
echo '<form id="setup" method="post" action="install.php?step=1">';
echo '<div class="language-chooser">';
echo '<select name="language" id="language-chooser" size="15">';
echo '<option selected="selected" value="">English (United States)</option>';
foreach ( $body['languages'] as $language ) {
@ -206,7 +211,6 @@ switch($step) {
}
echo "</select>\n";
echo '<p class="step"><input type="submit" class="button button-primary button-hero" value="&raquo;" /></p>';
echo '</div>';
echo '</form>';
break;
}