From 85166cc6512f2ac46ee9dc17ed5f1010979a6ca1 Mon Sep 17 00:00:00 2001
From: Michal Zuber <info@nevilleweb.sk>
Date: Fri, 4 Jul 2014 10:21:56 +0200
Subject: [PATCH] Changed redeclare issue of functions from
 wp-include/plugin.php and language chooser to select with
 size

---
 wp-admin/css/install.css | 39 +++++----------------------------------
 wp-admin/install.php     | 27 ++++++++-------------------
 wp-settings.php          |  2 +-
 3 files changed, 14 insertions(+), 54 deletions(-)

diff --git a/wp-admin/css/install.css b/wp-admin/css/install.css
index dfed0f3..6985a55 100644
--- a/wp-admin/css/install.css
+++ b/wp-admin/css/install.css
@@ -316,49 +316,20 @@ body.language-chooser {
 	max-width: 450px;
 }
 
-.language-chooser fieldset {
-	margin: 1px;
-	padding: 8px;
-	display: block;
+.language-chooser select {
+	margin: .5em 0 0;
+	padding: 2%;
 	border: 1px solid #ddd;
-	-webkit-border-radius: 0;
-	border-radius: 0; /* Reset mobile webkit's default element styling */
-	-webkit-transition: .05s border-color ease-in-out;
-	transition: .05s border-color ease-in-out;
-	outline: 0;
-	-webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.07);
-	box-shadow: inset 0 1px 2px rgba(0,0,0,0.07);
-	background-color: #fff;
 	color: #333;
-	font-size: 16px;
-	font-family: inherit;
-	font-weight: inherit;
-	overflow-y: scroll;
 	height: 250px;
-}
-
-/* TODO:add focus style via JS */
-.language-chooser fieldset.focus {
-	border-color: #5b9dd9;
-	-webkit-box-shadow: 0 0 2px rgba(30,140,190,0.8);
-	box-shadow: 0 0 2px rgba(30,140,190,0.8);
-}
-
-.wp-core-ui.language-chooser .button.button-hero {
-	font-size: 30px;
-	line-height: 30px;
+	width: 96%;
 }
 
 .language-chooser p {
 	text-align: right;
 }
 
-.language-chooser input:checked + label{
-	  color:white;
-	  background: #0074A2;
-}
-
-.language-chooser label{
+.language-chooser label {
 	display:block;
 }
 
diff --git a/wp-admin/install.php b/wp-admin/install.php
index a78c722..a470949 100644
--- a/wp-admin/install.php
+++ b/wp-admin/install.php
@@ -210,26 +210,15 @@ switch($step) {
 		if ( $body ) {
 			display_header( 'language-chooser' );
 			echo '<form id="setup" method="post" action="install.php?step=1">';
-			echo "<fieldset>\n";
-			echo "<legend class='screen-reader-text'>Select a default language</legend>\n";
-			echo '<input type="radio" checked="checked" class="screen-reader-input" name="language" id="language_default" value="">';
-			echo '<label for="language_default">English (United States)</label>';
-			echo "\n";
-
-			if ( defined( 'WPLANG' ) && ( '' !== WPLANG ) && ( 'en_US' !== WPLANG ) ) {
-				if ( isset( $body['languages'][WPLANG] ) ) {
-					$language = $body['languages'][WPLANG];
-					echo '<input type="radio" name="language" checked="checked" class="' . esc_attr( $language['language'] ) . ' screen-reader-input" id="language_wplang" value="' . esc_attr( $language['language'] ) . '">';
-					echo '<label for="language_wplang">' . esc_html( $language['native_name'] ) . "</label>\n";
-				}
-			}
+			echo "<label for='language'>Select the default language</label>\n";
+			echo "<select size='8' name='language' autofocus='autofocus'>\n";
+			echo '<option value="" selected="selected">English (US)</option>';
 
-			foreach ( $body['languages'] as $language ) {
-				echo '<input type="radio" name="language" class="' . esc_attr( $language['language'] ) . ' screen-reader-input" id="language_'. esc_attr( $language['language'] ) .'" value="' . esc_attr( $language['language'] ) . '">';
-				echo '<label for="language_' . esc_attr( $language['language'] ) . '">' . esc_html( $language['native_name'] ) . "</label>\n";
-			}
-			echo "</fieldset>\n";
-			echo '<p class="step"><input type="submit" class="button button-primary button-hero" value="&raquo;" /></p>';
+			foreach ( $body['languages'] as $language )
+				echo '<option value="' . esc_attr( $language['language'] ) . '">' . esc_html( $language['english_name'] ) . ' (' . esc_html( $language['native_name'] ) . ')</option>';
+
+			echo "</select>\n";
+			echo '<p class="step"><input type="submit" class="button button-primary button-hero" value="Continue in the selected language" /></p>';
 			echo '</form>';
 			break;
 		}
diff --git a/wp-settings.php b/wp-settings.php
index 65e7bf9..3b4d396 100644
--- a/wp-settings.php
+++ b/wp-settings.php
@@ -72,7 +72,7 @@ require( ABSPATH . WPINC . '/compat.php' );
 require( ABSPATH . WPINC . '/functions.php' );
 require( ABSPATH . WPINC . '/class-wp.php' );
 require( ABSPATH . WPINC . '/class-wp-error.php' );
-require( ABSPATH . WPINC . '/plugin.php' );
+require_once( ABSPATH . WPINC . '/plugin.php' );
 require( ABSPATH . WPINC . '/pomo/mo.php' );
 
 // Include the wpdb class and, if present, a db.php database drop-in.
-- 
1.7.12.4 (Apple Git-37)

