Make WordPress Core

Ticket #28577: 28577-size-select.diff

File 28577-size-select.diff, 4.7 KB (added by michalzuber, 10 years ago)
  • wp-admin/css/install.css

    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 b body.language-chooser { 
    316316        max-width: 450px;
    317317}
    318318
    319 .language-chooser fieldset {
    320         margin: 1px;
    321         padding: 8px;
    322         display: block;
     319.language-chooser select {
     320        margin: .5em 0 0;
     321        padding: 2%;
    323322        border: 1px solid #ddd;
    324         -webkit-border-radius: 0;
    325         border-radius: 0; /* Reset mobile webkit's default element styling */
    326         -webkit-transition: .05s border-color ease-in-out;
    327         transition: .05s border-color ease-in-out;
    328         outline: 0;
    329         -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,0.07);
    330         box-shadow: inset 0 1px 2px rgba(0,0,0,0.07);
    331         background-color: #fff;
    332323        color: #333;
    333         font-size: 16px;
    334         font-family: inherit;
    335         font-weight: inherit;
    336         overflow-y: scroll;
    337324        height: 250px;
    338 }
    339 
    340 /* TODO:add focus style via JS */
    341 .language-chooser fieldset.focus {
    342         border-color: #5b9dd9;
    343         -webkit-box-shadow: 0 0 2px rgba(30,140,190,0.8);
    344         box-shadow: 0 0 2px rgba(30,140,190,0.8);
    345 }
    346 
    347 .wp-core-ui.language-chooser .button.button-hero {
    348         font-size: 30px;
    349         line-height: 30px;
     325        width: 96%;
    350326}
    351327
    352328.language-chooser p {
    353329        text-align: right;
    354330}
    355331
    356 .language-chooser input:checked + label{
    357           color:white;
    358           background: #0074A2;
    359 }
    360 
    361 .language-chooser label{
     332.language-chooser label {
    362333        display:block;
    363334}
    364335
  • wp-admin/install.php

    diff --git a/wp-admin/install.php b/wp-admin/install.php
    index a78c722..a470949 100644
    a b switch($step) { 
    210210                if ( $body ) {
    211211                        display_header( 'language-chooser' );
    212212                        echo '<form id="setup" method="post" action="install.php?step=1">';
    213                         echo "<fieldset>\n";
    214                         echo "<legend class='screen-reader-text'>Select a default language</legend>\n";
    215                         echo '<input type="radio" checked="checked" class="screen-reader-input" name="language" id="language_default" value="">';
    216                         echo '<label for="language_default">English (United States)</label>';
    217                         echo "\n";
    218 
    219                         if ( defined( 'WPLANG' ) && ( '' !== WPLANG ) && ( 'en_US' !== WPLANG ) ) {
    220                                 if ( isset( $body['languages'][WPLANG] ) ) {
    221                                         $language = $body['languages'][WPLANG];
    222                                         echo '<input type="radio" name="language" checked="checked" class="' . esc_attr( $language['language'] ) . ' screen-reader-input" id="language_wplang" value="' . esc_attr( $language['language'] ) . '">';
    223                                         echo '<label for="language_wplang">' . esc_html( $language['native_name'] ) . "</label>\n";
    224                                 }
    225                         }
     213                        echo "<label for='language'>Select the default language</label>\n";
     214                        echo "<select size='8' name='language' autofocus='autofocus'>\n";
     215                        echo '<option value="" selected="selected">English (US)</option>';
    226216
    227                         foreach ( $body['languages'] as $language ) {
    228                                 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'] ) . '">';
    229                                 echo '<label for="language_' . esc_attr( $language['language'] ) . '">' . esc_html( $language['native_name'] ) . "</label>\n";
    230                         }
    231                         echo "</fieldset>\n";
    232                         echo '<p class="step"><input type="submit" class="button button-primary button-hero" value="&raquo;" /></p>';
     217                        foreach ( $body['languages'] as $language )
     218                                echo '<option value="' . esc_attr( $language['language'] ) . '">' . esc_html( $language['english_name'] ) . ' (' . esc_html( $language['native_name'] ) . ')</option>';
     219
     220                        echo "</select>\n";
     221                        echo '<p class="step"><input type="submit" class="button button-primary button-hero" value="Continue in the selected language" /></p>';
    233222                        echo '</form>';
    234223                        break;
    235224                }
  • wp-settings.php

    diff --git a/wp-settings.php b/wp-settings.php
    index 65e7bf9..3b4d396 100644
    a b require( ABSPATH . WPINC . '/compat.php' ); 
    7272require( ABSPATH . WPINC . '/functions.php' );
    7373require( ABSPATH . WPINC . '/class-wp.php' );
    7474require( ABSPATH . WPINC . '/class-wp-error.php' );
    75 require( ABSPATH . WPINC . '/plugin.php' );
     75require_once( ABSPATH . WPINC . '/plugin.php' );
    7676require( ABSPATH . WPINC . '/pomo/mo.php' );
    7777
    7878// Include the wpdb class and, if present, a db.php database drop-in.