Eliminate use of `extract()` in `request_filesystem_credentials()`.
The only property that doesn't need to be set to a variable is `$password`. See #22400. git-svn-id: https://develop.svn.wordpress.org/trunk@28456 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
6fa89637e5
commit
ccc874514c
|
@ -1084,11 +1084,13 @@ function request_filesystem_credentials($form_post, $type = '', $error = false,
|
||||||
update_option('ftp_credentials', $stored_credentials);
|
update_option('ftp_credentials', $stored_credentials);
|
||||||
return $credentials;
|
return $credentials;
|
||||||
}
|
}
|
||||||
$hostname = '';
|
$hostname = isset( $credentials['hostname'] ) ? $credentials['hostname'] : '';
|
||||||
$username = '';
|
$username = isset( $credentials['username'] ) ? $credentials['username'] : '';
|
||||||
$connection_type = '';
|
$public_key = isset( $credentials['public_key'] ) ? $credentials['public_key'] : '';
|
||||||
if ( !empty($credentials) )
|
$private_key = isset( $credentials['private_key'] ) ? $credentials['private_key'] : '';
|
||||||
extract($credentials, EXTR_OVERWRITE);
|
$port = isset( $credentials['port'] ) ? $credentials['port'] : '';
|
||||||
|
$connection_type = isset( $credentials[''] ) ? $credentials[''] : '';
|
||||||
|
|
||||||
if ( $error ) {
|
if ( $error ) {
|
||||||
$error_string = __('<strong>ERROR:</strong> There was an error connecting to the server, Please verify the settings are correct.');
|
$error_string = __('<strong>ERROR:</strong> There was an error connecting to the server, Please verify the settings are correct.');
|
||||||
if ( is_wp_error($error) )
|
if ( is_wp_error($error) )
|
||||||
|
@ -1178,7 +1180,8 @@ jQuery(function($){
|
||||||
<label for="public_key"><?php _e('Public Key:') ?></label ><br />
|
<label for="public_key"><?php _e('Public Key:') ?></label ><br />
|
||||||
<label for="private_key"><?php _e('Private Key:') ?></label>
|
<label for="private_key"><?php _e('Private Key:') ?></label>
|
||||||
</div></th>
|
</div></th>
|
||||||
<td><br /><input name="public_key" type="text" id="public_key" value="<?php echo esc_attr($public_key) ?>"<?php disabled( defined('FTP_PUBKEY') ); ?> size="40" /><br /><input name="private_key" type="text" id="private_key" value="<?php echo esc_attr($private_key) ?>"<?php disabled( defined('FTP_PRIKEY') ); ?> size="40" />
|
<td><br /><input name="public_key" type="text" id="public_key" value="<?php echo esc_attr($public_key) ?>"<?php disabled( defined('FTP_PUBKEY') ); ?> size="40" />
|
||||||
|
<br /><input name="private_key" type="text" id="private_key" value="<?php echo esc_attr($private_key) ?>"<?php disabled( defined('FTP_PRIKEY') ); ?> size="40" />
|
||||||
<div><?php _e('Enter the location on the server where the keys are located. If a passphrase is needed, enter that in the password field above.') ?></div></td>
|
<div><?php _e('Enter the location on the server where the keys are located. If a passphrase is needed, enter that in the password field above.') ?></div></td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
|
|
Loading…
Reference in New Issue