Make WordPress Core


Ignore:
Timestamp:
01/08/2015 07:04:40 AM (12 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-login.php

    r30855 r31090  
    277277        if ( empty( $_POST['user_login'] ) ) {
    278278                $errors->add('empty_username', __('<strong>ERROR</strong>: Enter a username or e-mail address.'));
    279         } else if ( strpos( $_POST['user_login'], '@' ) ) {
     279        } elseif ( strpos( $_POST['user_login'], '@' ) ) {
    280280                $user_data = get_user_by( 'email', trim( $_POST['user_login'] ) );
    281281                if ( empty( $user_data ) )
     
    334334        $allow = apply_filters( 'allow_password_reset', true, $user_data->ID );
    335335
    336         if ( ! $allow )
    337                 return new WP_Error('no_password_reset', __('Password reset is not allowed for this user'));
    338         else if ( is_wp_error($allow) )
     336        if ( ! $allow ) {
     337                return new WP_Error( 'no_password_reset', __('Password reset is not allowed for this user') );
     338        } elseif ( is_wp_error( $allow ) ) {
    339339                return $allow;
     340        }
    340341
    341342        // Generate something random for a password reset key.
Note: See TracChangeset for help on using the changeset viewer.