Make WordPress Core


Ignore:
Timestamp:
01/08/2015 07:04:40 AM (11 years ago)
Author:
wonderboymusic
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/file.php

    r31077 r31090  
    930930                $method = 'direct';
    931931                $GLOBALS['_wp_filesystem_direct_method'] = 'file_owner';
    932             } else if ( $allow_relaxed_file_ownership ) {
     932            } elseif ( $allow_relaxed_file_ownership ) {
    933933                // The $context directory is writable, and $allow_relaxed_file_ownership is set, this means we can modify files
    934934                // safely in this directory. This mode doesn't create new files, only alter existing ones.
     
    10391039    }
    10401040
    1041     if ( ( defined('FTP_SSH') && FTP_SSH ) || ( defined('FS_METHOD') && 'ssh2' == FS_METHOD ) )
     1041    if ( ( defined( 'FTP_SSH' ) && FTP_SSH ) || ( defined( 'FS_METHOD' ) && 'ssh2' == FS_METHOD ) ) {
    10421042        $credentials['connection_type'] = 'ssh';
    1043     else if ( (defined('FTP_SSL') && FTP_SSL) && 'ftpext' == $type ) //Only the FTP Extension understands SSL
     1043    } elseif ( ( defined( 'FTP_SSL' ) && FTP_SSL ) && 'ftpext' == $type ) { //Only the FTP Extension understands SSL
    10441044        $credentials['connection_type'] = 'ftps';
    1045     else if ( !empty($_POST['connection_type']) )
     1045    } elseif ( ! empty( $_POST['connection_type'] ) ) {
    10461046        $credentials['connection_type'] = wp_unslash( $_POST['connection_type'] );
    1047     else if ( !isset($credentials['connection_type']) ) //All else fails (And it's not defaulted to something else saved), Default to FTP
     1047    } elseif ( ! isset( $credentials['connection_type'] ) ) { //All else fails (And it's not defaulted to something else saved), Default to FTP
    10481048        $credentials['connection_type'] = 'ftp';
    1049 
     1049    }
    10501050    if ( ! $error &&
    10511051            (
Note: See TracChangeset for help on using the changeset viewer.