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-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';
Note: See TracChangeset for help on using the changeset viewer.