<?php
do_action( 'bp_before_profile_content' );
?>

<div class="profile">
    <?php
    if ( 'edit' == bp_current_action() ) {
        locate_template( array( 'members/single/profile/edit.php' ), true );
    } elseif ( 'change-avatar' == bp_current_action() ) {
        locate_template( array( 'members/single/profile/change-avatar.php' ), true );
    } else {
        locate_template( array( 'members/single/profile/profile-loop.php' ), true );
    }
    ?>
</div><!-- .profile -->

<?php
do_action( 'bp_after_profile_content' );
?>