Skip to:
Content

BuddyPress.org

Changeset 9315


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.

Location:
trunk/src
Files:
31 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-activity/bp-activity-actions.php

    r9308 r9315  
    9292
    9393        // Set redirect to users' activity stream
    94         } else if ( ! empty( $activity->user_id ) ) {
     94        } elseif ( ! empty( $activity->user_id ) ) {
    9595                $redirect = bp_core_get_user_domain( $activity->user_id, $activity->user_nicename, $activity->user_login ) . bp_get_activity_slug() . '/' . $activity->id . '/';
    9696        }
     
    340340
    341341        // Post to groups object
    342         } else if ( 'groups' == $object && bp_is_active( 'groups' ) ) {
     342        } elseif ( 'groups' == $object && bp_is_active( 'groups' ) ) {
    343343                if ( (int) $item_id ) {
    344344                        $activity_id = groups_post_update( array( 'content' => $content, 'group_id' => $item_id ) );
     
    812812
    813813        // Unpublishing a previously published post.
    814         } else if ( 'publish' === $old_status ) {
     814        } elseif ( 'publish' === $old_status ) {
    815815                // Some form of pending status - only remove the activity entry
    816816                bp_activity_post_type_unpublish( $post->ID, $post );
  • trunk/src/bp-activity/bp-activity-classes.php

    r9308 r9315  
    170170                // If no callback is available, use the literal string from
    171171                // the database row
    172                 } else if ( ! empty( $row->action ) ) {
     172                } elseif ( ! empty( $row->action ) ) {
    173173                        $this->action = $row->action;
    174174
     
    12781278
    12791279                // A true cache miss
    1280                 } else if ( empty( $comments ) ) {
     1280                } elseif ( empty( $comments ) ) {
    12811281
    12821282                        // Select the user's fullname with the query
  • trunk/src/bp-activity/bp-activity-template.php

    r9308 r9315  
    653653        if ( isset( $_GET['afilter'] ) && apply_filters( 'bp_activity_enable_afilter_support', false ) )
    654654                $filter = array( 'object' => $_GET['afilter'] );
    655         else if ( ! empty( $user_id ) || ! empty( $object ) || ! empty( $action ) || ! empty( $primary_id ) || ! empty( $secondary_id ) || ! empty( $offset ) || ! empty( $since ) )
     655        elseif ( ! empty( $user_id ) || ! empty( $object ) || ! empty( $action ) || ! empty( $primary_id ) || ! empty( $secondary_id ) || ! empty( $offset ) || ! empty( $since ) )
    656656                $filter = array( 'user_id' => $user_id, 'object' => $object, 'action' => $action, 'primary_id' => $primary_id, 'secondary_id' => $secondary_id, 'offset' => $offset, 'since' => $since );
    657657        else
     
    43094309
    43104310                        // On individual group pages, default to 'group'
    4311                         } else if ( bp_is_active( 'groups' ) && bp_is_group() ) {
     4311                        } elseif ( bp_is_active( 'groups' ) && bp_is_group() ) {
    43124312                                $context = 'group';
    43134313
  • trunk/src/bp-core/bp-core-avatars.php

    r9308 r9315  
    316316        if ( false !== $params['width'] ) {
    317317                // Width has been specified. No modification necessary.
    318         } else if ( 'thumb' == $params['type'] ) {
     318        } elseif ( 'thumb' == $params['type'] ) {
    319319                $params['width'] = bp_core_avatar_thumb_width();
    320320        } else {
     
    326326        if ( false !== $params['height'] ) {
    327327                // Height has been specified. No modification necessary.
    328         } else if ( 'thumb' == $params['type'] ) {
     328        } elseif ( 'thumb' == $params['type'] ) {
    329329                $params['height'] = bp_core_avatar_thumb_height();
    330330        } else {
     
    425425                if ( empty( $bp->grav_default->{$params['object']} ) ) {
    426426                        $default_grav = 'wavatar';
    427                 } else if ( 'mystery' == $bp->grav_default->{$params['object']} ) {
     427                } elseif ( 'mystery' == $bp->grav_default->{$params['object']} ) {
    428428                        $default_grav = apply_filters( 'bp_core_mysteryman_src', 'mm', $params['width'] );
    429429                } else {
     
    435435                        if ( 'user' == $params['object'] ) {
    436436                                $params['email'] = bp_core_get_user_email( $params['item_id'] );
    437                         } else if ( 'group' == $params['object'] || 'blog' == $params['object'] ) {
     437                        } elseif ( 'group' == $params['object'] || 'blog' == $params['object'] ) {
    438438                                $params['email'] = $params['item_id'] . '-' . $params['object'] . '@' . bp_get_root_domain();
    439439                        }
     
    497497                if ( 'user' == $object )
    498498                        $item_id = bp_displayed_user_id();
    499                 else if ( 'group' == $object )
     499                elseif ( 'group' == $object )
    500500                        $item_id = buddypress()->groups->current_group->id;
    501                 else if ( 'blog' == $object )
     501                elseif ( 'blog' == $object )
    502502                        $item_id = $current_blog->id;
    503503
     
    510510                if ( 'user' == $object )
    511511                        $avatar_dir = 'avatars';
    512                 else if ( 'group' == $object )
     512                elseif ( 'group' == $object )
    513513                        $avatar_dir = 'group-avatars';
    514                 else if ( 'blog' == $object )
     514                elseif ( 'blog' == $object )
    515515                        $avatar_dir = 'blog-avatars';
    516516
     
    831831
    832832        // If passed a number, assume it was a $user_id
    833         } else if ( is_numeric( $user ) ) {
     833        } elseif ( is_numeric( $user ) ) {
    834834                $id = $user;
    835835
     
    11451145
    11461146        // Use the local default image
    1147         } else if ( 'local' === $type ) {
     1147        } elseif ( 'local' === $type ) {
    11481148                $avatar = buddypress()->plugin_url . 'bp-core/images/mystery-man.jpg';
    11491149
     
    11811181
    11821182        // Use the local default image
    1183         } else if ( 'local' === $type ) {
     1183        } elseif ( 'local' === $type ) {
    11841184                $avatar = buddypress()->plugin_url . 'bp-core/images/mystery-man-50.jpg';
    11851185
     
    12221222
    12231223        // Group's avatar create screen
    1224         } else if ( bp_is_group_create() ) {
     1224        } elseif ( bp_is_group_create() ) {
    12251225                /**
    12261226                 * we can't use bp_get_groups_current_create_step()
  • trunk/src/bp-core/bp-core-buddybar.php

    r9131 r9315  
    392392                        // In the case of a user page, we try to assume a
    393393                        // redirect URL
    394                         } else if ( bp_is_user() ) {
     394                        } elseif ( bp_is_user() ) {
    395395
    396396                                // Redirect to the displayed user's default
  • trunk/src/bp-core/bp-core-catchuri.php

    r9308 r9315  
    671671                // and the current user is logged in. In this case we send to
    672672                // the members directory to avoid redirect loops
    673                 } else if ( bp_is_register_page() && 'register' == $front_page_component && is_user_logged_in() ) {
     673                } elseif ( bp_is_register_page() && 'register' == $front_page_component && is_user_logged_in() ) {
    674674                        $bp->canonical_stack['canonical_url'] = apply_filters( 'bp_loggedin_register_page_redirect_to', trailingslashit( bp_get_root_domain() . '/' . bp_get_members_root_slug() ) );
    675675                }
  • trunk/src/bp-core/bp-core-classes.php

    r9308 r9315  
    279279                                        $sql['orderby'] = "ORDER BY u.user_id";
    280280                                        $sql['order'] = "DESC";
    281                                 } else if ( 'random' == $type ) {
     281                                } elseif ( 'random' == $type ) {
    282282                                        $sql['orderby'] = "ORDER BY rand()";
    283283                                } else {
     
    20362036                        // No button if viewing your own profile (and not in
    20372037                        // a members loop)
    2038                         } else if ( bp_is_my_profile() ) {
     2038                        } elseif ( bp_is_my_profile() ) {
    20392039                                return false;
    20402040                        }
     
    28342834                        if ( 'relation' === $key ) {
    28352835                                $relation = $query['relation'];
    2836                         } else if ( is_array( $clause ) ) {
     2836                        } elseif ( is_array( $clause ) ) {
    28372837                                // This is a first-order clause
    28382838                                if ( $this->is_first_order_clause( $clause ) ) {
     
    28422842                                        if ( ! $where_count ) {
    28432843                                                $sql_chunks['where'][] = '';
    2844                                         } else if ( 1 === $where_count ) {
     2844                                        } elseif ( 1 === $where_count ) {
    28452845                                                $sql_chunks['where'][] = $clause_sql['where'][0];
    28462846                                        } else {
     
    29052905                                $relation = $query;
    29062906
    2907                         } else if ( ! is_array( $query ) ) {
     2907                        } elseif ( ! is_array( $query ) ) {
    29082908                                continue;
    29092909
    29102910                        // First-order clause.
    2911                         } else if ( $this->is_first_order_clause( $query ) ) {
     2911                        } elseif ( $this->is_first_order_clause( $query ) ) {
    29122912                                if ( isset( $query['value'] ) && array() === $query['value'] ) {
    29132913                                        unset( $query['value'] );
     
    29392939                 * simplifies the logic around combining key-only queries.
    29402940                 */
    2941                 } else if ( 1 === count( $clean_queries ) ) {
     2941                } elseif ( 1 === count( $clean_queries ) ) {
    29422942                        $clean_queries['relation'] = 'OR';
    29432943
  • trunk/src/bp-core/bp-core-cssjs.php

    r8772 r9315  
    126126
    127127        // Less than 2x full-width: cropper defaults to full-width
    128         } else if ( $image[0] < ( $full_width * 2 ) ) {
     128        } elseif ( $image[0] < ( $full_width * 2 ) ) {
    129129                $padding_w  = round( ( $image[0] - $full_width ) / 2 );
    130130                $crop_left  = $padding_w;
     
    143143
    144144        // Less than double full-height: cropper defaults to full-height
    145         } else if ( $image[1] < ( $full_height * 2 ) ) {
     145        } elseif ( $image[1] < ( $full_height * 2 ) ) {
    146146                $padding_h   = round( ( $image[1] - $full_height ) / 2 );
    147147                $crop_top    = $padding_h;
  • trunk/src/bp-core/bp-core-filters.php

    r9308 r9315  
    376376                 * meta['password'] is not set, the activation url must be WordPress one
    377377                 */
    378                 } else if ( buddypress()->members->admin->signups_page == get_current_screen()->id ) {
     378                } elseif ( buddypress()->members->admin->signups_page == get_current_screen()->id ) {
    379379                        $is_hashpass_in_meta = maybe_unserialize( $meta );
    380380
  • trunk/src/bp-core/bp-core-functions.php

    r9308 r9315  
    113113                        if ( isset( $index->' . $key . ' ) ) {
    114114                                $values[ $indexi ] = $index->' . $key . ';
    115                         } else if ( isset( $index["' . $key . '"] ) ) {
     115                        } elseif ( isset( $index["' . $key . '"] ) ) {
    116116                                $values[ $indexi ] = $index["' . $key . '"];
    117117                        }
     
    127127                        if ( 0 > $cmp ) {
    128128                                $retval = -1;
    129                         } else if ( 0 < $cmp ) {
     129                        } elseif ( 0 < $cmp ) {
    130130                                $retval = 1;
    131131                        } else {
  • trunk/src/bp-core/bp-core-theme-compatibility.php

    r9308 r9315  
    289289                // Brute-force check for a BP template
    290290                // Examples are clones of bp-default
    291                 } else if ( locate_template( 'members/members-loop.php', false, false ) ) {
     291                } elseif ( locate_template( 'members/members-loop.php', false, false ) ) {
    292292                        $theme_compat = false;
    293293                }
  • trunk/src/bp-friends/bp-friends-actions.php

    r7556 r9315  
    4141                }
    4242
    43         } else if ( 'is_friend' == $friendship_status ) {
     43        } elseif ( 'is_friend' == $friendship_status ) {
    4444                bp_core_add_message( __( 'You are already friends with this user', 'buddypress' ), 'error' );
    4545        } else {
     
    7979                }
    8080
    81         } else if ( 'is_friends' == $friendship_status ) {
     81        } elseif ( 'is_friends' == $friendship_status ) {
    8282                bp_core_add_message( __( 'You are not yet friends with this user', 'buddypress' ), 'error' );
    8383        } else {
  • trunk/src/bp-friends/bp-friends-template.php

    r9308 r9315  
    271271                if ( empty( $user_id ) && isset( $friends_template->friendship->friend ) )
    272272                        $user_id = $friends_template->friendship->friend->id;
    273                 else if ( empty( $user_id ) && !isset( $friends_template->friendship->friend ) )
     273                elseif ( empty( $user_id ) && !isset( $friends_template->friendship->friend ) )
    274274                        $user_id = bp_displayed_user_id();
    275275
  • trunk/src/bp-groups/bp-groups-actions.php

    r9308 r9315  
    3535
    3636                // User doesn't have access, so set up redirect args
    37                 } else if ( is_user_logged_in() ) {
     37                } elseif ( is_user_logged_in() ) {
    3838                        $no_access_args = array(
    3939                                'message'  => __( 'You do not have access to this group.', 'buddypress' ),
     
    184184                        if ( 'private' == $_POST['group-status'] )
    185185                                $group_status = 'private';
    186                         else if ( 'hidden' == $_POST['group-status'] )
     186                        elseif ( 'hidden' == $_POST['group-status'] )
    187187                                $group_status = 'hidden';
    188188
  • trunk/src/bp-groups/bp-groups-activity.php

    r9308 r9315  
    166166
    167167        // Name and description changed - to keep things short, don't describe changes in detail.
    168         } else if ( isset( $changed['name'] ) && isset( $changed['description'] ) ) {
     168        } elseif ( isset( $changed['name'] ) && isset( $changed['description'] ) ) {
    169169                $action = sprintf( __( '%1$s changed the name and description of the group %2$s', 'buddypress' ), $user_link, $group_link );
    170170
    171171        // Name only.
    172         } else if ( ! empty( $changed['name']['old'] ) && ! empty( $changed['name']['new'] ) ) {
     172        } elseif ( ! empty( $changed['name']['old'] ) && ! empty( $changed['name']['new'] ) ) {
    173173                $action = sprintf( __( '%1$s changed the name of the group %2$s from "%3$s" to "%4$s"', 'buddypress' ), $user_link, $group_link, esc_html( $changed['name']['old'] ), esc_html( $changed['name']['new'] ) );
    174174
    175175        // Description only.
    176         } else if ( ! empty( $changed['description']['old'] ) && ! empty( $changed['description']['new'] ) ) {
     176        } elseif ( ! empty( $changed['description']['old'] ) && ! empty( $changed['description']['new'] ) ) {
    177177                $action = sprintf( __( '%1$s changed the description of the group %2$s from "%3$s" to "%4$s"', 'buddypress' ), $user_link, $group_link, esc_html( $changed['description']['old'] ), esc_html( $changed['description']['new'] ) );
    178178
  • trunk/src/bp-groups/bp-groups-admin.php

    r9308 r9315  
    103103                bp_core_redirect( $redirect_to );
    104104
    105         } else if ( 'edit' == $doaction && ! empty( $_GET['gid'] ) ) {
     105        } elseif ( 'edit' == $doaction && ! empty( $_GET['gid'] ) ) {
    106106                // columns screen option
    107107                add_screen_option( 'layout_columns', array( 'default' => 2, 'max' => 2, ) );
     
    309309                                                                if ( 'admin' == $existing_role || 'mod' == $existing_role ) {
    310310                                                                        $result = groups_demote_member( $user_id, $group_id );
    311                                                                 } else if ( 'banned' == $existing_role ) {
     311                                                                } elseif ( 'banned' == $existing_role ) {
    312312                                                                        $result = groups_unban_member( $user_id, $group_id );
    313313                                                                }
     
    420420
    421421        // Display the group deletion confirmation screen
    422         } else if ( 'delete' == $doaction && ! empty( $_GET['gid'] ) ) {
     422        } elseif ( 'delete' == $doaction && ! empty( $_GET['gid'] ) ) {
    423423                bp_groups_admin_delete();
    424424
     
    457457                if ( ! empty( $errors ) ) {
    458458                        $messages[] = __( 'An error occurred when trying to update your group details.', 'buddypress' );
    459                 } else if ( ! empty( $updated ) ) {
     459                } elseif ( ! empty( $updated ) ) {
    460460                        $messages[] = __( 'The group has been updated successfully.', 'buddypress' );
    461461                }
  • trunk/src/bp-groups/bp-groups-classes.php

    r9308 r9315  
    12961296
    12971297                                // invite_sent means the user has been invited
    1298                                 } else if ( $user_status[ $gid ]->invite_sent ) {
     1298                                } elseif ( $user_status[ $gid ]->invite_sent ) {
    12991299                                        $is_invited = '1';
    13001300
     
    16121612
    16131613                        // The string 'any' matches any non-zero value (inviter_id != 0)
    1614                         } else if ( 'any' === $inviter_id ) {
     1614                        } elseif ( 'any' === $inviter_id ) {
    16151615                                $sql['where'][] = "inviter_id != 0";
    16161616
     
    33703370                                $this->params['show_tab'] = 'noone';
    33713371
    3372                         } else if ( isset( $this->params_raw['enable_nav_item'] ) || isset( $this->params_raw['visibility'] ) ) {
     3372                        } elseif ( isset( $this->params_raw['enable_nav_item'] ) || isset( $this->params_raw['visibility'] ) ) {
    33733373                                // If enable_nav_item or visibility is passed,
    33743374                                // we assume this  is a legacy extension.
  • trunk/src/bp-groups/bp-groups-functions.php

    r9309 r9315  
    922922
    923923        // Otherwise, create a new invitation
    924         } else if ( ! groups_is_user_member( $user_id, $group_id ) && ! groups_check_user_has_invite( $user_id, $group_id, 'all' ) ) {
     924        } elseif ( ! groups_is_user_member( $user_id, $group_id ) && ! groups_check_user_has_invite( $user_id, $group_id, 'all' ) ) {
    925925                $invite                = new BP_Groups_Member;
    926926                $invite->group_id      = $group_id;
  • trunk/src/bp-groups/bp-groups-loader.php

    r9131 r9315  
    649649                                $bp->bp_options_title = _x( 'Memberships', 'My Groups page <title>', 'buddypress' );
    650650
    651                         } else if ( !bp_is_my_profile() && !bp_is_single_item() ) {
     651                        } elseif ( !bp_is_my_profile() && !bp_is_single_item() ) {
    652652                                $bp->bp_options_avatar = bp_core_fetch_avatar( array(
    653653                                        'item_id' => bp_displayed_user_id(),
     
    659659                        // We are viewing a single group, so set up the
    660660                        // group navigation menu using the $this->current_group global.
    661                         } else if ( bp_is_single_item() ) {
     661                        } elseif ( bp_is_single_item() ) {
    662662                                $bp->bp_options_title  = $this->current_group->name;
    663663                                $bp->bp_options_avatar = bp_core_fetch_avatar( array(
  • trunk/src/bp-groups/bp-groups-screens.php

    r9308 r9315  
    7272                bp_core_redirect( $redirect_to );
    7373
    74         } else if ( bp_is_action_variable( 'reject' ) && is_numeric( $group_id ) ) {
     74        } elseif ( bp_is_action_variable( 'reject' ) && is_numeric( $group_id ) ) {
    7575                // Check the nonce
    7676                if ( !check_admin_referer( 'groups_reject_invite' ) )
     
    180180
    181181                // Sticky a topic
    182                 else if ( bp_is_action_variable( 'stick', 2 ) && ( bp_is_item_admin() || bp_is_item_mod() ) ) {
     182                elseif ( bp_is_action_variable( 'stick', 2 ) && ( bp_is_item_admin() || bp_is_item_mod() ) ) {
    183183                        // Check the nonce
    184184                        check_admin_referer( 'bp_forums_stick_topic' );
     
    195195
    196196                // Un-Sticky a topic
    197                 else if ( bp_is_action_variable( 'unstick', 2 ) && ( bp_is_item_admin() || bp_is_item_mod() ) ) {
     197                elseif ( bp_is_action_variable( 'unstick', 2 ) && ( bp_is_item_admin() || bp_is_item_mod() ) ) {
    198198                        // Check the nonce
    199199                        check_admin_referer( 'bp_forums_unstick_topic' );
     
    210210
    211211                // Close a topic
    212                 else if ( bp_is_action_variable( 'close', 2 ) && ( bp_is_item_admin() || bp_is_item_mod() ) ) {
     212                elseif ( bp_is_action_variable( 'close', 2 ) && ( bp_is_item_admin() || bp_is_item_mod() ) ) {
    213213                        // Check the nonce
    214214                        check_admin_referer( 'bp_forums_close_topic' );
     
    225225
    226226                // Open a topic
    227                 else if ( bp_is_action_variable( 'open', 2 ) && ( bp_is_item_admin() || bp_is_item_mod() ) ) {
     227                elseif ( bp_is_action_variable( 'open', 2 ) && ( bp_is_item_admin() || bp_is_item_mod() ) ) {
    228228                        // Check the nonce
    229229                        check_admin_referer( 'bp_forums_open_topic' );
     
    240240
    241241                // Delete a topic
    242                 else if ( empty( $user_is_banned ) && bp_is_action_variable( 'delete', 2 ) && !bp_action_variable( 3 ) ) {
     242                elseif ( empty( $user_is_banned ) && bp_is_action_variable( 'delete', 2 ) && !bp_action_variable( 3 ) ) {
    243243                        // Fetch the topic
    244244                        $topic = bp_forums_get_topic_details( $topic_id );
     
    265265
    266266                // Editing a topic
    267                 else if ( empty( $user_is_banned ) && bp_is_action_variable( 'edit', 2 ) && !bp_action_variable( 3 ) ) {
     267                elseif ( empty( $user_is_banned ) && bp_is_action_variable( 'edit', 2 ) && !bp_action_variable( 3 ) ) {
    268268                        // Fetch the topic
    269269                        $topic = bp_forums_get_topic_details( $topic_id );
     
    293293
    294294                // Delete a post
    295                 } else if ( empty( $user_is_banned ) && bp_is_action_variable( 'delete', 2 ) && $post_id = bp_action_variable( 4 ) ) {
     295                } elseif ( empty( $user_is_banned ) && bp_is_action_variable( 'delete', 2 ) && $post_id = bp_action_variable( 4 ) ) {
    296296                        // Fetch the post
    297297                        $post = bp_forums_get_post( $post_id );
     
    317317
    318318                // Editing a post
    319                 } else if ( empty( $user_is_banned ) && bp_is_action_variable( 'edit', 2 ) && $post_id = bp_action_variable( 4 ) ) {
     319                } elseif ( empty( $user_is_banned ) && bp_is_action_variable( 'edit', 2 ) && $post_id = bp_action_variable( 4 ) ) {
    320320
    321321                        // Fetch the post
     
    380380                        if ( empty( $_POST['topic_title'] ) ) {
    381381                                $error_message = __( 'Please provide a title for your forum topic.', 'buddypress' );
    382                         } else if ( empty( $_POST['topic_text'] ) ) {
     382                        } elseif ( empty( $_POST['topic_text'] ) ) {
    383383                                $error_message = __( 'Forum posts cannot be empty. Please enter some text.', 'buddypress' );
    384384                        }
     
    493493                $message = __( 'You are not allowed to send or remove invites', 'buddypress' );
    494494                $error = 'error';
    495         } else if ( BP_Groups_Member::check_for_membership_request( $friend_id, $group_id ) ) {
     495        } elseif ( BP_Groups_Member::check_for_membership_request( $friend_id, $group_id ) ) {
    496496                $message = __( 'The member requested to join the group', 'buddypress' );
    497497                $error = 'error';
    498         } else if ( ! groups_uninvite_user( $friend_id, $group_id ) ) {
     498        } elseif ( ! groups_uninvite_user( $friend_id, $group_id ) ) {
    499499                $message = __( 'There was an error removing the invite', 'buddypress' );
    500500                $error = 'error';
  • trunk/src/bp-groups/bp-groups-template.php

    r9308 r9315  
    234234                if ( 'invites' == $type ) {
    235235                        $this->groups = groups_get_invites_for_user( $user_id, $this->pag_num, $this->pag_page, $exclude );
    236                 } else if ( 'single-group' == $type ) {
     236                } elseif ( 'single-group' == $type ) {
    237237                        $this->single_group = true;
    238238
     
    280280                        $this->group_count       = (int) $this->groups['total'];
    281281                        $this->groups            = $this->groups['groups'];
    282                 } else if ( 'single-group' == $type ) {
     282                } elseif ( 'single-group' == $type ) {
    283283                        if ( empty( $group->id ) ) {
    284284                                $this->total_group_count = 0;
     
    711711                if ( 'public' == $group->status ) {
    712712                        $type = __( "Public Group", "buddypress" );
    713                 } else if ( 'hidden' == $group->status ) {
     713                } elseif ( 'hidden' == $group->status ) {
    714714                        $type = __( "Hidden Group", "buddypress" );
    715                 } else if ( 'private' == $group->status ) {
     715                } elseif ( 'private' == $group->status ) {
    716716                        $type = __( "Private Group", "buddypress" );
    717717                } else {
     
    18631863                        // Default to the current group first
    18641864                        $group_id = $bp->groups->current_group->id;
    1865                 } else if ( isset( $groups_template->group->id ) ) {
     1865                } elseif ( isset( $groups_template->group->id ) ) {
    18661866                        // Then see if we're in the loop
    18671867                        $group_id = $groups_template->group->id;
     
    29472947                        if ( is_user_logged_in() && bp_group_is_invited() ) {
    29482948                                $message = __( 'You must accept your pending invitation before you can access this private group.', 'buddypress' );
    2949                         } else if ( is_user_logged_in() ) {
     2949                        } elseif ( is_user_logged_in() ) {
    29502950                                $message = __( 'This is a private group and you must request group membership in order to join.', 'buddypress' );
    29512951                        } else {
  • trunk/src/bp-groups/bp-groups-widgets.php

    r8480 r9315  
    9393                                                                        if ( 'active' == $instance['group_default'] )
    9494                                                                                printf( __( 'active %s', 'buddypress' ), bp_get_group_last_active() );
    95                                                                         else if ( 'popular' == $instance['group_default'] )
     95                                                                        elseif ( 'popular' == $instance['group_default'] )
    9696                                                                                bp_group_member_count();
    9797                                                                ?>
     
    203203                                                        if ( 'newest-groups' == $_POST['filter'] ) {
    204204                                                                printf( __( 'created %s', 'buddypress' ), bp_get_group_date_created() );
    205                                                         } else if ( 'recently-active-groups' == $_POST['filter'] ) {
     205                                                        } elseif ( 'recently-active-groups' == $_POST['filter'] ) {
    206206                                                                printf( __( 'active %s', 'buddypress' ), bp_get_group_last_active() );
    207                                                         } else if ( 'popular-groups' == $_POST['filter'] ) {
     207                                                        } elseif ( 'popular-groups' == $_POST['filter'] ) {
    208208                                                                bp_group_member_count();
    209209                                                        }
  • trunk/src/bp-members/bp-members-admin.php

    r9308 r9315  
    14711471
    14721472                        // Handle activated accounts
    1473                         } else if ( 'do_activate' == $doaction ) {
     1473                        } elseif ( 'do_activate' == $doaction ) {
    14741474
    14751475                                // nonce check
     
    14981498
    14991499                        // Handle sign-ups delete
    1500                         } else if ( 'do_delete' == $doaction ) {
     1500                        } elseif ( 'do_delete' == $doaction ) {
    15011501
    15021502                                // nonce check
     
    18761876                if ( ! empty( $_POST['allsignups'] ) ) {
    18771877                        $ids = wp_parse_id_list( $_POST['allsignups'] );
    1878                 } else if ( ! empty( $_GET['signup_id'] ) ) {
     1878                } elseif ( ! empty( $_GET['signup_id'] ) ) {
    18791879                        $ids = absint( $_GET['signup_id'] );
    18801880                }
  • trunk/src/bp-members/bp-members-functions.php

    r9273 r9315  
    19391939                // If a user ID is found, this may be a legacy signup, or one
    19401940                // created locally for backward compatibility. Process it.
    1941                 } else if ( $key == wp_hash( $user_id ) ) {
     1941                } elseif ( $key == wp_hash( $user_id ) ) {
    19421942                        // Change the user's status so they become active
    19431943                        if ( ! $wpdb->query( $wpdb->prepare( "UPDATE {$wpdb->users} SET user_status = 0 WHERE ID = %d", $user_id ) ) ) {
     
    23972397        if ( isset( $_GLOBALS['pagenow'] ) && false !== strpos( $GLOBALS['pagenow'], 'wp-login.php' ) ) {
    23982398                $is_login = true;
    2399         } else if ( isset( $_SERVER['SCRIPT_NAME'] ) && false !== strpos( $_SERVER['SCRIPT_NAME'], 'wp-login.php' ) ) {
     2399        } elseif ( isset( $_SERVER['SCRIPT_NAME'] ) && false !== strpos( $_SERVER['SCRIPT_NAME'], 'wp-login.php' ) ) {
    24002400                $is_login = true;
    24012401        }
  • trunk/src/bp-members/bp-members-template.php

    r9308 r9315  
    607607                if ( 'active' == $members_template->type )
    608608                        $pag = sprintf( _n( 'Viewing 1 active member', 'Viewing %1$s - %2$s of %3$s active members', $members_template->total_member_count, 'buddypress' ), $from_num, $to_num, $total );
    609                 else if ( 'popular' == $members_template->type )
     609                elseif ( 'popular' == $members_template->type )
    610610                        $pag = sprintf( _n( 'Viewing 1 member with friends', 'Viewing %1$s - %2$s of %3$s members with friends', $members_template->total_member_count, 'buddypress' ), $from_num, $to_num, $total );
    611                 else if ( 'online' == $members_template->type )
     611                elseif ( 'online' == $members_template->type )
    612612                        $pag = sprintf( _n( 'Viewing 1 online member', 'Viewing %1$s - %2$s of %3$s online members', $members_template->total_member_count, 'buddypress' ), $from_num, $to_num, $total );
    613613                else
     
    21832183                        if ( empty( $bp->grav_default->user ) )
    21842184                                $default_grav = 'wavatar';
    2185                         else if ( 'mystery' == $bp->grav_default->user )
     2185                        elseif ( 'mystery' == $bp->grav_default->user )
    21862186                                $default_grav = $bp->plugin_url . 'bp-core/images/mystery-man.jpg';
    21872187                        else
  • trunk/src/bp-messages/bp-messages-classes.php

    r9301 r9315  
    475475                if ( $type == 'unread' )
    476476                        $type_sql = " AND unread_count != 0 ";
    477                 else if ( $type == 'read' )
     477                elseif ( $type == 'read' )
    478478                        $type_sql = " AND unread_count = 0 ";
    479479
  • trunk/src/bp-messages/bp-messages-screens.php

    r9216 r9315  
    211211                                bp_core_add_message( __('Notice deactivated.', 'buddypress') );
    212212                        }
    213                 } else if ( bp_is_action_variable( 'activate', 0 ) ) {
     213                } elseif ( bp_is_action_variable( 'activate', 0 ) ) {
    214214                        if ( !$notice->activate() ) {
    215215                                bp_core_add_message( __('There was a problem activating that notice.', 'buddypress'), 'error' );
     
    217217                                bp_core_add_message( __('Notice activated.', 'buddypress') );
    218218                        }
    219                 } else if ( bp_is_action_variable( 'delete' ) ) {
     219                } elseif ( bp_is_action_variable( 'delete' ) ) {
    220220                        if ( !$notice->delete() ) {
    221221                                bp_core_add_message( __('There was a problem deleting that notice.', 'buddypress'), 'buddypress' );
  • trunk/src/bp-messages/bp-messages-template.php

    r9301 r9315  
    11541154                         */
    11551155                        return apply_filters( 'bp_get_messages_username_value', $_COOKIE['bp_messages_send_to'] );
    1156                 } else if ( isset( $_GET['r'] ) && !isset( $_COOKIE['bp_messages_send_to'] ) ) {
     1156                } elseif ( isset( $_GET['r'] ) && !isset( $_COOKIE['bp_messages_send_to'] ) ) {
    11571157                        /** This filter is documented in bp-messages-template.php */
    11581158                        return apply_filters( 'bp_get_messages_username_value', $_GET['r'] );
  • trunk/src/bp-templates/bp-legacy/buddypress-functions.php

    r9308 r9315  
    10801080
    10811081                // Create the user invitation
    1082                 } else if ( groups_invite_user( array( 'user_id' => $friend_id, 'group_id' => $group_id ) ) ) {
     1082                } elseif ( groups_invite_user( array( 'user_id' => $friend_id, 'group_id' => $group_id ) ) ) {
    10831083                        $user_status = 'is_invited';
    10841084
  • trunk/src/bp-xprofile/bp-xprofile-admin.php

    r9298 r9315  
    4444                xprofile_admin_manage_field( $_GET['group_id'] );
    4545
    46         else if ( isset( $_GET['mode'] ) && isset( $_GET['group_id'] ) && isset( $_GET['field_id'] ) && 'edit_field' == $_GET['mode'] )
     46        elseif ( isset( $_GET['mode'] ) && isset( $_GET['group_id'] ) && isset( $_GET['field_id'] ) && 'edit_field' == $_GET['mode'] )
    4747                xprofile_admin_manage_field( $_GET['group_id'], $_GET['field_id'] );
    4848
    49         else if ( isset( $_GET['mode'] ) && isset( $_GET['field_id'] ) && 'delete_field' == $_GET['mode'] )
     49        elseif ( isset( $_GET['mode'] ) && isset( $_GET['field_id'] ) && 'delete_field' == $_GET['mode'] )
    5050                xprofile_admin_delete_field( $_GET['field_id'], 'field');
    5151
    52         else if ( isset( $_GET['mode'] ) && isset( $_GET['option_id'] ) && 'delete_option' == $_GET['mode'] )
     52        elseif ( isset( $_GET['mode'] ) && isset( $_GET['option_id'] ) && 'delete_option' == $_GET['mode'] )
    5353                xprofile_admin_delete_field( $_GET['option_id'], 'option' );
    5454
    55         else if ( isset( $_GET['mode'] ) && 'add_group' == $_GET['mode'] )
     55        elseif ( isset( $_GET['mode'] ) && 'add_group' == $_GET['mode'] )
    5656                xprofile_admin_manage_group();
    5757
    58         else if ( isset( $_GET['mode'] ) && isset( $_GET['group_id'] ) && 'delete_group' == $_GET['mode'] )
     58        elseif ( isset( $_GET['mode'] ) && isset( $_GET['group_id'] ) && 'delete_group' == $_GET['mode'] )
    5959                xprofile_admin_delete_group( $_GET['group_id'] );
    6060
    61         else if ( isset( $_GET['mode'] ) && isset( $_GET['group_id'] ) && 'edit_group' == $_GET['mode'] )
     61        elseif ( isset( $_GET['mode'] ) && isset( $_GET['group_id'] ) && 'edit_group' == $_GET['mode'] )
    6262                xprofile_admin_manage_group( $_GET['group_id'] );
    6363
  • 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.