Changeset 37467 for trunk/src/wp-admin/includes/file.php
- Timestamp:
- 05/19/2016 10:58:55 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/file.php
r37421 r37467 1167 1167 1168 1168 ?> 1169 <script type="text/javascript">1170 <!--1171 jQuery(function($){1172 jQuery("#ssh").click(function () {1173 jQuery("#ssh_keys").show();1174 });1175 jQuery("#ftp, #ftps").click(function () {1176 jQuery("#ssh_keys").hide();1177 });1178 jQuery('#request-filesystem-credentials-form input[value=""]:first').focus();1179 });1180 -->1181 </script>1182 1169 <form action="<?php echo esc_url( $form_post ) ?>" method="post"> 1183 1170 <div id="request-filesystem-credentials-form" class="request-filesystem-credentials-form"> … … 1226 1213 </label> 1227 1214 </div> 1228 <?php if ( isset($types['ssh']) ) : ?>1229 1215 <fieldset> 1216 <legend><?php _e( 'Connection Type' ); ?></legend> 1217 <?php 1218 $disabled = disabled( ( defined( 'FTP_SSL' ) && FTP_SSL ) || ( defined( 'FTP_SSH' ) && FTP_SSH ), true, false ); 1219 foreach ( $types as $name => $text ) : ?> 1220 <label for="<?php echo esc_attr( $name ) ?>"> 1221 <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; ?> /> 1222 <?php echo $text; ?> 1223 </label> 1224 <?php 1225 endforeach; 1226 ?> 1227 </fieldset> 1228 <?php 1229 if ( isset( $types['ssh'] ) ) { 1230 $hidden_class = ''; 1231 if ( 'ssh' != $connection_type || empty( $connection_type ) ) { 1232 $hidden_class = ' class="hidden"'; 1233 } 1234 ?> 1235 <fieldset id="ssh-keys"<?php echo $hidden_class; ?>"> 1230 1236 <legend><?php _e( 'Authentication Keys' ); ?></legend> 1231 1237 <label for="public_key"> … … 1237 1243 <input name="private_key" type="text" id="private_key" value="<?php echo esc_attr($private_key) ?>"<?php disabled( defined('FTP_PRIKEY') ); ?> /> 1238 1244 </label> 1239 </fieldset> 1240 <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> 1241 <?php endif; ?> 1242 <fieldset> 1243 <legend><?php _e( 'Connection Type' ); ?></legend> 1244 <?php 1245 $disabled = disabled( (defined('FTP_SSL') && FTP_SSL) || (defined('FTP_SSH') && FTP_SSH), true, false ); 1246 foreach ( $types as $name => $text ) : ?> 1247 <label for="<?php echo esc_attr($name) ?>"> 1248 <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; ?> /> 1249 <?php echo $text ?> 1250 </label> 1251 <?php endforeach; ?> 1245 <p 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.' ) ?></p> 1252 1246 </fieldset> 1253 1247 <?php 1248 } 1249 1254 1250 foreach ( (array) $extra_fields as $field ) { 1255 1251 if ( isset( $_POST[ $field ] ) )
Note: See TracChangeset
for help on using the changeset viewer.