WordPress.org

Make WordPress Core

Ticket #34376: 34376-connectiontype.patch

File 34376-connectiontype.patch, 2.2 KB (added by Mte90, 5 years ago)

moved connection type after the hostname

  • wp-admin/includes/file.php

     
    11911191        <span class="field-title"><?php _e( 'Hostname' ) ?></span>
    11921192        <input name="hostname" type="text" id="hostname" aria-describedby="request-filesystem-credentials-desc" class="code" placeholder="<?php esc_attr_e( 'example: www.wordpress.org' ) ?>" value="<?php echo esc_attr($hostname); if ( !empty($port) ) echo ":$port"; ?>"<?php disabled( defined('FTP_HOST') ); ?> />
    11931193</label>
     1194<fieldset>
     1195<legend><?php _e( 'Connection Type' ); ?></legend>
     1196<?php
     1197        $disabled = disabled( (defined('FTP_SSL') && FTP_SSL) || (defined('FTP_SSH') && FTP_SSH), true, false );
     1198        foreach ( $types as $name => $text ) : ?>
     1199        <label for="<?php echo esc_attr($name) ?>">
     1200                <input type="radio" name="connection_type" id="<?php echo esc_attr($name) ?>" value="<?php echo esc_attr($name) ?>"<?php checked($name, $connection_type); echo $disabled; ?> />
     1201                <?php echo $text ?>
     1202        </label>
     1203        <?php endforeach; ?>
     1204</fieldset>
    11941205<div class="ftp-username">
    11951206        <label for="username">
    11961207                <span class="field-title"><?php echo $label_user; ?></span>
     
    12181229</fieldset>
    12191230<span id="auth-keys-desc"><?php _e('Enter the location on the server where the public and private keys are located. If a passphrase is needed, enter that in the password field above.') ?></span>
    12201231<?php endif; ?>
    1221 <fieldset>
    1222 <legend><?php _e( 'Connection Type' ); ?></legend>
    12231232<?php
    1224         $disabled = disabled( (defined('FTP_SSL') && FTP_SSL) || (defined('FTP_SSH') && FTP_SSH), true, false );
    1225         foreach ( $types as $name => $text ) : ?>
    1226         <label for="<?php echo esc_attr($name) ?>">
    1227                 <input type="radio" name="connection_type" id="<?php echo esc_attr($name) ?>" value="<?php echo esc_attr($name) ?>"<?php checked($name, $connection_type); echo $disabled; ?> />
    1228                 <?php echo $text ?>
    1229         </label>
    1230         <?php endforeach; ?>
    1231 </fieldset>
    1232 <?php
    12331233foreach ( (array) $extra_fields as $field ) {
    12341234        if ( isset( $_POST[ $field ] ) )
    12351235                echo '<input type="hidden" name="' . esc_attr( $field ) . '" value="' . esc_attr( wp_unslash( $_POST[ $field ] ) ) . '" />';