The keyword elseif should be used instead of else if so that all control keywords look like single words.

This was a mess, is now standardized across the codebase, except for a few 3rd-party libs. 

See #30799.


git-svn-id: https://develop.svn.wordpress.org/trunk@31090 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor
2015-01-08 07:04:40 +00:00
parent d0767caf54
commit 6fd11624d1
48 changed files with 181 additions and 170 deletions
+6 -6
View File
@@ -929,7 +929,7 @@ function get_filesystem_method( $args = array(), $context = false, $allow_relaxe
// this means it's safe to modify & create new files via PHP.
$method = 'direct';
$GLOBALS['_wp_filesystem_direct_method'] = 'file_owner';
} else if ( $allow_relaxed_file_ownership ) {
} elseif ( $allow_relaxed_file_ownership ) {
// The $context directory is writable, and $allow_relaxed_file_ownership is set, this means we can modify files
// safely in this directory. This mode doesn't create new files, only alter existing ones.
$method = 'direct';
@@ -1038,15 +1038,15 @@ function request_filesystem_credentials($form_post, $type = '', $error = false,
unset($credentials['port']);
}
if ( ( defined('FTP_SSH') && FTP_SSH ) || ( defined('FS_METHOD') && 'ssh2' == FS_METHOD ) )
if ( ( defined( 'FTP_SSH' ) && FTP_SSH ) || ( defined( 'FS_METHOD' ) && 'ssh2' == FS_METHOD ) ) {
$credentials['connection_type'] = 'ssh';
else if ( (defined('FTP_SSL') && FTP_SSL) && 'ftpext' == $type ) //Only the FTP Extension understands SSL
} elseif ( ( defined( 'FTP_SSL' ) && FTP_SSL ) && 'ftpext' == $type ) { //Only the FTP Extension understands SSL
$credentials['connection_type'] = 'ftps';
else if ( !empty($_POST['connection_type']) )
} elseif ( ! empty( $_POST['connection_type'] ) ) {
$credentials['connection_type'] = wp_unslash( $_POST['connection_type'] );
else if ( !isset($credentials['connection_type']) ) //All else fails (And it's not defaulted to something else saved), Default to FTP
} elseif ( ! isset( $credentials['connection_type'] ) ) { //All else fails (And it's not defaulted to something else saved), Default to FTP
$credentials['connection_type'] = 'ftp';
}
if ( ! $error &&
(
( !empty($credentials['password']) && !empty($credentials['username']) && !empty($credentials['hostname']) ) ||