Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/08/2015 09:43:47 PM (12 years ago)
Author:
johnjamesjacoby
Message:

s/else if/elseif/

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

Props wonderboymusic, hnla. See #6097.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-xprofile/bp-xprofile-classes.php

    r9308 r9315  
    192192                if ( ! empty( $profile_group_id ) ) {
    193193                        $where_sql = $wpdb->prepare( 'WHERE g.id = %d', $profile_group_id );
    194                 } else if ( $exclude_groups ) {
     194                } elseif ( $exclude_groups ) {
    195195                        $exclude_groups = join( ',', wp_parse_id_list( $exclude_groups ) );
    196196                        $where_sql = "WHERE g.id NOT IN ({$exclude_groups})";
     
    493493                                if ( 'default_visibility' == $level->meta_key ) {
    494494                                        $default_visibility_levels[ $level->object_id ]['default'] = $level->meta_value;
    495                                 } else if ( 'allow_custom_visibility' == $level->meta_key ) {
     495                                } elseif ( 'allow_custom_visibility' == $level->meta_key ) {
    496496                                        $default_visibility_levels[ $level->object_id ]['allow_custom'] = $level->meta_value;
    497497                                }
     
    13251325                                $result   = $wpdb->query( $wpdb->prepare( "UPDATE {$bp->profile->table_name_data} SET value = %s, last_updated = %s WHERE user_id = %d AND field_id = %d", $this->value, $this->last_updated, $this->user_id, $this->field_id ) );
    13261326
    1327                         } else if ( $this->exists() && empty( $this->value ) ) {
     1327                        } elseif ( $this->exists() && empty( $this->value ) ) {
    13281328                                // Data removed, delete the entry.
    13291329                                $result   = $this->delete();
     
    16411641                                        if ( $values[$i]->name == $fields[$j] ) {
    16421642                                                $new_values[$fields[$j]] = $values[$i]->value;
    1643                                         } else if ( !array_key_exists( $fields[$j], $new_values ) ) {
     1643                                        } elseif ( !array_key_exists( $fields[$j], $new_values ) ) {
    16441644                                                $new_values[$fields[$j]] = NULL;
    16451645                                        }
     
    37353735                                $relation = $query;
    37363736
    3737                         } else if ( ! is_array( $query ) ) {
     3737                        } elseif ( ! is_array( $query ) ) {
    37383738                                continue;
    37393739
    37403740                        // First-order clause.
    3741                         } else if ( $this->is_first_order_clause( $query ) ) {
     3741                        } elseif ( $this->is_first_order_clause( $query ) ) {
    37423742                                if ( isset( $query['value'] ) && array() === $query['value'] ) {
    37433743                                        unset( $query['value'] );
     
    37693769                 * simplifies the logic around combining key-only queries.
    37703770                 */
    3771                 } else if ( 1 === count( $clean_queries ) ) {
     3771                } elseif ( 1 === count( $clean_queries ) ) {
    37723772                        $clean_queries['relation'] = 'OR';
    37733773
     
    38863886                        if ( 'relation' === $key ) {
    38873887                                $relation = $query['relation'];
    3888                         } else if ( is_array( $clause ) ) {
     3888                        } elseif ( is_array( $clause ) ) {
    38893889
    38903890                                // This is a first-order clause.
     
    38953895                                        if ( ! $where_count ) {
    38963896                                                $sql_chunks['where'][] = '';
    3897                                         } else if ( 1 === $where_count ) {
     3897                                        } elseif ( 1 === $where_count ) {
    38983898                                                $sql_chunks['where'][] = $clause_sql['where'][0];
    38993899                                        } else {
     
    41504150
    41514151                        // Clauses joined by AND with "negative" operators share a join only if they also share a key.
    4152                         } else if ( isset( $sibling['field_id'] ) && isset( $clause['field_id'] ) && $sibling['field_id'] === $clause['field_id'] ) {
     4152                        } elseif ( isset( $sibling['field_id'] ) && isset( $clause['field_id'] ) && $sibling['field_id'] === $clause['field_id'] ) {
    41534153                                $compatible_compares = array( '!=', 'NOT IN', 'NOT LIKE' );
    41544154                        }
Note: See TracChangeset for help on using the changeset viewer.