Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
01/08/2015 09:43:47 PM (7 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-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()
Note: See TracChangeset for help on using the changeset viewer.