Skip to:
Content

BuddyPress.org

Changeset 9944


Ignore:
Timestamp:
06/15/2015 05:54:15 PM (5 years ago)
Author:
johnjamesjacoby
Message:

XProfile: Clean up xprofile_action_delete_avatar() with brackets & whitespace.

File:
1 edited

Legend:

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

    r9819 r9944  
    2727function xprofile_action_delete_avatar() {
    2828
    29     if ( !bp_is_user_change_avatar() || !bp_is_action_variable( 'delete-avatar', 0 ) )
     29    if ( ! bp_is_user_change_avatar() || ! bp_is_action_variable( 'delete-avatar', 0 ) ) {
    3030        return false;
     31    }
    3132
    3233    // Check the nonce
    3334    check_admin_referer( 'bp_delete_avatar_link' );
    3435
    35     if ( !bp_is_my_profile() && !bp_current_user_can( 'bp_moderate' ) )
     36    if ( ! bp_is_my_profile() && ! bp_current_user_can( 'bp_moderate' ) ) {
    3637        return false;
     38    }
    3739
    38     if ( bp_core_delete_existing_avatar( array( 'item_id' => bp_displayed_user_id() ) ) )
     40    if ( bp_core_delete_existing_avatar( array( 'item_id' => bp_displayed_user_id() ) ) ) {
    3941        bp_core_add_message( __( 'Your profile photo was deleted successfully!', 'buddypress' ) );
    40     else
     42    } else {
    4143        bp_core_add_message( __( 'There was a problem deleting your profile photo. Please try again.', 'buddypress' ), 'error' );
     44    }
    4245
    4346    bp_core_redirect( wp_get_referer() );
Note: See TracChangeset for help on using the changeset viewer.