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-includes/meta.php

    r30979 r31090  
    996996                $relation = $query;
    997997
    998             } else if ( ! is_array( $query ) ) {
     998            } elseif ( ! is_array( $query ) ) {
    999999                continue;
    10001000
    10011001            // First-order clause.
    1002             } else if ( $this->is_first_order_clause( $query ) ) {
     1002            } elseif ( $this->is_first_order_clause( $query ) ) {
    10031003                if ( isset( $query['value'] ) && array() === $query['value'] ) {
    10041004                    unset( $query['value'] );
     
    10301030         * simplifies the logic around combining key-only queries.
    10311031         */
    1032         } else if ( 1 === count( $clean_queries ) ) {
     1032        } elseif ( 1 === count( $clean_queries ) ) {
    10331033            $clean_queries['relation'] = 'OR';
    10341034
     
    10941094                $existing_meta_query,
    10951095            );
    1096         } else if ( ! empty( $primary_meta_query ) ) {
     1096        } elseif ( ! empty( $primary_meta_query ) ) {
    10971097            $meta_query = array(
    10981098                $primary_meta_query,
    10991099            );
    1100         } else if ( ! empty( $existing_meta_query ) ) {
     1100        } elseif ( ! empty( $existing_meta_query ) ) {
    11011101            $meta_query = $existing_meta_query;
    11021102        }
     
    12551255            if ( 'relation' === $key ) {
    12561256                $relation = $query['relation'];
    1257             } else if ( is_array( $clause ) ) {
     1257            } elseif ( is_array( $clause ) ) {
    12581258
    12591259                // This is a first-order clause.
     
    12641264                    if ( ! $where_count ) {
    12651265                        $sql_chunks['where'][] = '';
    1266                     } else if ( 1 === $where_count ) {
     1266                    } elseif ( 1 === $where_count ) {
    12671267                        $sql_chunks['where'][] = $clause_sql['where'][0];
    12681268                    } else {
     
    14931493
    14941494            // Clauses joined by AND with "negative" operators share a join only if they also share a key.
    1495             } else if ( isset( $sibling['key'] ) && isset( $clause['key'] ) && $sibling['key'] === $clause['key'] ) {
     1495            } elseif ( isset( $sibling['key'] ) && isset( $clause['key'] ) && $sibling['key'] === $clause['key'] ) {
    14961496                $compatible_compares = array( '!=', 'NOT IN', 'NOT LIKE' );
    14971497            }
Note: See TracChangeset for help on using the changeset viewer.