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/upgrade.php

    r31089 r31090  
    7575        update_user_option($user_id, 'default_password_nag', true, true);
    7676        $email_password = true;
    77     } else if ( !$user_id ) {
     77    } elseif ( ! $user_id ) {
    7878        // Password has been provided
    7979        $message = '<em>'.__('Your chosen password.').'</em>';
     
    841841                $status = 'publish';
    842842                $type = 'page';
    843             } else if ( 'attachment' == $status ) {
     843            } elseif ( 'attachment' == $status ) {
    844844                $status = 'inherit';
    845845                $type = 'attachment';
     
    17171717    // Create a tablename index for an array ($cqueries) of queries
    17181718    foreach($queries as $qry) {
    1719         if (preg_match("|CREATE TABLE ([^ ]*)|", $qry, $matches)) {
     1719        if ( preg_match( "|CREATE TABLE ([^ ]*)|", $qry, $matches ) ) {
    17201720            $cqueries[ trim( $matches[1], '`' ) ] = $qry;
    17211721            $for_update[$matches[1]] = 'Created table '.$matches[1];
    1722         } else if (preg_match("|CREATE DATABASE ([^ ]*)|", $qry, $matches)) {
    1723             array_unshift($cqueries, $qry);
    1724         } else if (preg_match("|INSERT INTO ([^ ]*)|", $qry, $matches)) {
     1722        } elseif ( preg_match( "|CREATE DATABASE ([^ ]*)|", $qry, $matches ) ) {
     1723            array_unshift( $cqueries, $qry );
     1724        } elseif ( preg_match( "|INSERT INTO ([^ ]*)|", $qry, $matches ) ) {
    17251725            $iqueries[] = $qry;
    1726         } else if (preg_match("|UPDATE ([^ ]*)|", $qry, $matches)) {
     1726        } elseif ( preg_match( "|UPDATE ([^ ]*)|", $qry, $matches ) ) {
    17271727            $iqueries[] = $qry;
    17281728        } else {
     
    18761876                if ($index_name == 'PRIMARY') {
    18771877                    $index_string .= 'PRIMARY ';
    1878                 } else if($index_data['unique']) {
     1878                } elseif ( $index_data['unique'] ) {
    18791879                    $index_string .= 'UNIQUE ';
    18801880                }
Note: See TracChangeset for help on using the changeset viewer.