Skip to:
Content

BuddyPress.org

Changeset 2389


Ignore:
Timestamp:
01/21/2010 11:19:32 AM (14 years ago)
Author:
apeatling
Message:

Fixed issues with the listing of hidden groups when you are logged in. Switched all references of bp_is_home() to the more appropriate bp_is_my_profile().

Location:
trunk
Files:
18 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity.php

    r2387 r2389  
    114114
    115115    if ( $bp->current_component == $bp->activity->slug ) {
    116         if ( bp_is_home() ) {
     116        if ( bp_is_my_profile() ) {
    117117            $bp->bp_options_title = __( 'My Activity', 'buddypress' );
    118118        } else {
  • trunk/bp-blogs.php

    r2383 r2389  
    117117 * @package BuddyPress Blogs
    118118 * @global $bp The global BuddyPress settings variable created in bp_core_setup_globals()
    119  * @uses bp_is_home() Checks to see if the current user being viewed is the logged in user
     119 * @uses bp_is_my_profile() Checks to see if the current user being viewed is the logged in user
    120120 */
    121121function bp_blogs_setup_nav() {
     
    139139    /* Set up the component options navigation for Blog */
    140140    if ( 'blogs' == $bp->current_component ) {
    141         if ( bp_is_home() ) {
     141        if ( bp_is_my_profile() ) {
    142142            if ( function_exists('xprofile_setup_nav') ) {
    143143                $bp->bp_options_title = __('My Blogs', 'buddypress');
  • trunk/bp-blogs/bp-blogs-classes.php

    r2324 r2389  
    115115
    116116        // Show logged in users their hidden blogs.
    117         if ( !bp_is_home() )
     117        if ( !bp_is_my_profile() )
    118118            $blogs = $wpdb->get_results( $wpdb->prepare( "SELECT DISTINCT b.id, bm1.meta_value as name, bm2.meta_value as description, wb.domain, wb.path FROM {$bp->blogs->table_name} b, {$wpdb->base_prefix}blogs wb, {$bp->blogs->table_name_blogmeta} bm1, {$bp->blogs->table_name_blogmeta} bm2 WHERE b.blog_id = wb.blog_id AND b.blog_id = bm1.blog_id AND b.blog_id = bm2.blog_id AND bm1.meta_key = 'name' AND bm2.meta_key = 'description' AND wb.public = 1 AND wb.deleted = 0 AND wb.spam = 0 AND wb.mature = 0 AND wb.archived = '0' AND b.user_id = %d ", $user_id) );
    119119        else
     
    476476
    477477        // Show a logged in user their posts on private blogs, but not anyone else.
    478         if ( !bp_is_home() ) {
     478        if ( !bp_is_my_profile() ) {
    479479            $post_ids = $wpdb->get_results( $wpdb->prepare( "SELECT p.post_id, p.blog_id FROM {$bp->blogs->table_name_blog_posts} p LEFT JOIN {$wpdb->base_prefix}blogs b ON p.blog_id = b.blog_id WHERE b.public = 1 AND b.deleted = 0 AND b.archived = '0' AND b.spam = 0 AND b.mature = 0 AND p.user_id = %d ORDER BY p.date_created DESC", $user_id) );
    480480            $total_post_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(p.post_id) FROM {$bp->blogs->table_name_blog_posts} p LEFT JOIN {$wpdb->base_prefix}blogs b ON p.blog_id = b.blog_id WHERE b.public = 1 AND b.deleted = 0 AND b.archived = '0' AND b.spam = 0 AND b.mature = 0 AND p.user_id = %d", $user_id) );
     
    670670
    671671        // Show the logged in user their comments on hidden blogs, but not to anyone else.
    672         if ( !bp_is_home() ) {
     672        if ( !bp_is_my_profile() ) {
    673673            $comment_ids = $wpdb->get_results( $wpdb->prepare( "SELECT c.comment_id, c.blog_id FROM {$bp->blogs->table_name_blog_comments} c LEFT JOIN {$wpdb->base_prefix}blogs b ON c.blog_id = b.blog_id WHERE b.public = 1 AND b.deleted = 0 AND b.archived = '0' AND b.spam = 0 AND b.mature = 0 AND c.user_id = %d ORDER BY c.date_created ASC", $user_id) );
    674674            $total_comment_count = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(c.comment_id) FROM {$bp->blogs->table_name_blog_comments} c LEFT JOIN {$wpdb->base_prefix}blogs b ON c.blog_id = b.blog_id WHERE b.public = 1 AND b.deleted = 0 AND b.archived = '0' AND b.spam = 0 AND b.mature = 0 AND c.user_id = %d", $user_id) );
  • trunk/bp-blogs/bp-blogs-templatetags.php

    r2375 r2389  
    11531153    global $bp;
    11541154
    1155     if ( bp_is_home() ) {
     1155    if ( bp_is_my_profile() )   {
    11561156        echo apply_filters( 'bp_create_blog_link', '<a href="' . $bp->loggedin_user->domain . $bp->blogs->slug . '/create-a-blog">' . __('Create a Blog', 'buddypress') . '</a>' );
    11571157    }
     
    11621162
    11631163    // Don't show these tabs on a user's own profile
    1164     if ( bp_is_home() )
     1164    if ( bp_is_my_profile() )
    11651165        return false;
    11661166
  • trunk/bp-core.php

    r2381 r2389  
    332332 * @uses bp_core_new_nav_item() Adds a navigation item to the top level buddypress navigation
    333333 * @uses bp_core_new_subnav_item() Adds a sub navigation item to a nav item
    334  * @uses bp_is_home() Returns true if the current user being viewed is equal the logged in user
     334 * @uses bp_is_my_profile() Returns true if the current user being viewed is equal the logged in user
    335335 * @uses bp_core_fetch_avatar() Returns the either the thumb or full avatar URL for the user_id passed
    336336 */
     
    369369
    370370        if ( 'profile' == $bp->current_component ) {
    371             if ( bp_is_home() ) {
     371            if ( bp_is_my_profile() ) {
    372372                $bp->bp_options_title = __('My Profile', 'buddypress');
    373373            } else {
     
    426426    global $bp, $wpdb;
    427427
    428     if ( !is_site_admin() || bp_is_home() || !$bp->displayed_user->id )
     428    if ( !is_site_admin() || bp_is_my_profile() || !$bp->displayed_user->id )
    429429        return false;
    430430
     
    486486    global $bp;
    487487
    488     if ( !is_site_admin() || bp_is_home() || !$bp->displayed_user->id )
     488    if ( !is_site_admin() || bp_is_my_profile() || !$bp->displayed_user->id )
    489489        return false;
    490490
  • trunk/bp-core/bp-core-settings.php

    r2277 r2389  
    1919    $settings_link = $bp->loggedin_user->domain . 'settings/';
    2020
    21     bp_core_new_subnav_item( array( 'name' => __( 'General', 'buddypress' ), 'slug' => 'general', 'parent_url' => $settings_link, 'parent_slug' => $bp->settings->slug, 'screen_function' => 'bp_core_screen_general_settings', 'position' => 10, 'user_has_access' => bp_is_home() ) );
    22     bp_core_new_subnav_item( array( 'name' => __( 'Notifications', 'buddypress' ), 'slug' => 'notifications', 'parent_url' => $settings_link, 'parent_slug' => $bp->settings->slug, 'screen_function' => 'bp_core_screen_notification_settings', 'position' => 20, 'user_has_access' => bp_is_home() ) );
     21    bp_core_new_subnav_item( array( 'name' => __( 'General', 'buddypress' ), 'slug' => 'general', 'parent_url' => $settings_link, 'parent_slug' => $bp->settings->slug, 'screen_function' => 'bp_core_screen_general_settings', 'position' => 10, 'user_has_access' => bp_is_my_profile() ) );
     22    bp_core_new_subnav_item( array( 'name' => __( 'Notifications', 'buddypress' ), 'slug' => 'notifications', 'parent_url' => $settings_link, 'parent_slug' => $bp->settings->slug, 'screen_function' => 'bp_core_screen_notification_settings', 'position' => 20, 'user_has_access' => bp_is_my_profile() ) );
    2323
    2424    if ( !is_site_admin() && !(int) get_site_option( 'bp-disable-account-deletion' ) )
    25         bp_core_new_subnav_item( array( 'name' => __( 'Delete Account', 'buddypress' ), 'slug' => 'delete-account', 'parent_url' => $settings_link, 'parent_slug' => $bp->settings->slug, 'screen_function' => 'bp_core_screen_delete_account', 'position' => 90, 'user_has_access' => bp_is_home() ) );
     25        bp_core_new_subnav_item( array( 'name' => __( 'Delete Account', 'buddypress' ), 'slug' => 'delete-account', 'parent_url' => $settings_link, 'parent_slug' => $bp->settings->slug, 'screen_function' => 'bp_core_screen_delete_account', 'position' => 90, 'user_has_access' => bp_is_my_profile() ) );
    2626}
    2727add_action( 'wp', 'bp_core_add_settings_nav', 2 );
  • trunk/bp-core/bp-core-templatetags.php

    r2383 r2389  
    515515     * menus for something like a group, or event.
    516516     */
    517     if ( bp_is_home() || $bp->is_single_item ) {
     517    if ( bp_is_my_profile() || $bp->is_single_item ) {
    518518        if ( count( $bp->bp_options_nav[$bp->current_component] ) < 1 )
    519519            return false;
  • trunk/bp-friends.php

    r2381 r2389  
    7373    /* Add the subnav items to the friends nav item */
    7474    bp_core_new_subnav_item( array( 'name' => __( 'My Friends', 'buddypress' ), 'slug' => 'my-friends', 'parent_url' => $friends_link, 'parent_slug' => $bp->friends->slug, 'screen_function' => 'friends_screen_my_friends', 'position' => 10, 'item_css_id' => 'friends-my-friends' ) );
    75     bp_core_new_subnav_item( array( 'name' => __( 'Requests', 'buddypress' ), 'slug' => 'requests', 'parent_url' => $friends_link, 'parent_slug' => $bp->friends->slug, 'screen_function' => 'friends_screen_requests', 'position' => 20, 'user_has_access' => bp_is_home() ) );
     75    bp_core_new_subnav_item( array( 'name' => __( 'Requests', 'buddypress' ), 'slug' => 'requests', 'parent_url' => $friends_link, 'parent_slug' => $bp->friends->slug, 'screen_function' => 'friends_screen_requests', 'position' => 20, 'user_has_access' => bp_is_my_profile() ) );
    7676
    7777    if ( $bp->current_component == $bp->friends->slug ) {
    78         if ( bp_is_home() ) {
     78        if ( bp_is_my_profile() ) {
    7979            $bp->bp_options_title = __( 'My Friends', 'buddypress' );
    8080        } else {
  • trunk/bp-groups.php

    r2381 r2389  
    155155    if ( $bp->current_component == $bp->groups->slug ) {
    156156
    157         if ( bp_is_home() && !$bp->is_single_item ) {
     157        if ( bp_is_my_profile() && !$bp->is_single_item ) {
    158158
    159159            $bp->bp_options_title = __( 'My Groups', 'buddypress' );
    160160
    161         } else if ( !bp_is_home() && !$bp->is_single_item ) {
     161        } else if ( !bp_is_my_profile() && !$bp->is_single_item ) {
    162162
    163163            $bp->bp_options_avatar = bp_core_fetch_avatar( array( 'item_id' => $bp->displayed_user->id, 'type' => 'thumb' ) );
     
    19031903    ) );
    19041904
     1905    do_action( 'bp_groups_posted_update', $content, $user_id, $group_id, $activity_id );
     1906
    19051907    return $activity_id;
    19061908}
  • trunk/bp-groups/bp-groups-classes.php

    r2352 r2389  
    345345            $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
    346346
    347         if ( !is_site_admin() )
     347        if ( !is_site_admin() && ( $user_id != $bp->loggedin_user->id ) )
    348348            $hidden_sql = "AND g.status != 'hidden'";
    349349
     
    371371        }
    372372
    373         if ( !is_site_admin() )
     373        if ( !is_site_admin() && ( $user_id != $bp->loggedin_user->id ) )
    374374            $hidden_sql = "AND g.status != 'hidden'";
    375375
     
    396396            $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
    397397
    398         if ( !is_site_admin() )
     398        if ( !is_site_admin() && ( $user_id != $bp->loggedin_user->id ) )
    399399            $hidden_sql = " AND g.status != 'hidden'";
    400400
     
    425425        }
    426426
     427        if ( !is_site_admin() && ( $user_id != $bp->loggedin_user->id ) )
     428            $hidden_sql = " AND g.status != 'hidden'";
     429
    427430        if ( $search_terms ) {
    428431            $search_terms = like_escape( $wpdb->escape( $search_terms ) );
     
    450453            $pag_sql = $wpdb->prepare( " LIMIT %d, %d", intval( ( $page - 1 ) * $limit), intval( $limit ) );
    451454        }
     455
     456        if ( !is_site_admin() && ( $user_id != $bp->loggedin_user->id ) )
     457            $hidden_sql = " AND g.status != 'hidden'";
    452458
    453459        if ( $search_terms ) {
     
    566572        global $wpdb, $bp;
    567573
    568         return $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(id) FROM {$bp->groups->table_name}" ) );
     574        if ( !is_site_admin() )
     575            $hidden_sql = "WHERE status != 'hidden'";
     576
     577        return $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(id) FROM {$bp->groups->table_name} {$hidden_sql}" ) );
    569578    }
    570579
     
    751760
    752761        // If the user is logged in and viewing their own groups, we can show hidden and private groupss
    753         if ( bp_is_home() ) {
     762        if ( $user_id != $bp->loggedin_user->id ) {
    754763            $group_sql = $wpdb->prepare( "SELECT DISTINCT group_id FROM {$bp->groups->table_name_members} WHERE user_id = %d AND inviter_id = 0 AND is_banned = 0{$pag_sql}", $user_id );
    755764            $total_groups = $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(DISTINCT group_id) FROM {$bp->groups->table_name_members} WHERE user_id = %d AND inviter_id = 0 AND is_banned = 0", $user_id ) );
     
    775784        }
    776785
    777         if ( !bp_is_home() )
     786        if ( $user_id != $bp->loggedin_user->id )
    778787            $hidden_sql = " AND g.status != 'hidden'";
    779788
     
    795804        }
    796805
    797         if ( !bp_is_home() )
     806        if ( $user_id != $bp->loggedin_user->id )
    798807            $hidden_sql = " AND g.status != 'hidden'";
    799808
     
    815824        }
    816825
    817         if ( !bp_is_home() )
     826        if ( $user_id != $bp->loggedin_user->id )
    818827            $hidden_sql = " AND g.status != 'hidden'";
    819828
     
    830839            $user_id = $bp->displayed_user->id;
    831840
    832         if ( bp_is_home() ) {
    833             return $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(DISTINCT group_id) FROM {$bp->groups->table_name_members} WHERE user_id = %d AND inviter_id = 0 AND is_banned = 0", $user_id ) );
    834         } else {
     841        if ( $user_id != $bp->loggedin_user->id && !is_site_admin() ) {
    835842            return $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(DISTINCT m.group_id) FROM {$bp->groups->table_name_members} m, {$bp->groups->table_name} g WHERE m.group_id = g.id AND g.status != 'hidden' AND m.user_id = %d AND m.inviter_id = 0 AND m.is_banned = 0", $user_id ) );
     843        } else {
     844            return $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(DISTINCT m.group_id) FROM {$bp->groups->table_name_members} m, {$bp->groups->table_name} g WHERE m.group_id = g.id AND m.user_id = %d AND m.inviter_id = 0 AND m.is_banned = 0", $user_id ) );
    836845        }
    837846    }
     
    924933
    925934        // If the user is logged in and viewing their random groups, we can show hidden and private groups
    926         if ( bp_is_home() ) {
     935        if ( bp_is_my_profile() ) {
    927936            return $wpdb->get_col( $wpdb->prepare( "SELECT DISTINCT group_id FROM {$bp->groups->table_name_members} WHERE user_id = %d AND is_confirmed = 1 AND is_banned = 0 ORDER BY rand() LIMIT $total_groups", $user_id ) );
    928937        } else {
  • trunk/bp-messages.php

    r2179 r2389  
    117117
    118118    /* Add the subnav items to the profile */
    119     bp_core_new_subnav_item( array( 'name' => __( 'Inbox', 'buddypress' ) . $count_indicator, 'slug' => 'inbox', 'parent_url' => $messages_link, 'parent_slug' => $bp->messages->slug, 'screen_function' => 'messages_screen_inbox', 'position' => 10, 'user_has_access' => bp_is_home() ) );
    120     bp_core_new_subnav_item( array( 'name' => __( 'Sent Messages', 'buddypress' ), 'slug' => 'sentbox', 'parent_url' => $messages_link, 'parent_slug' => $bp->messages->slug, 'screen_function' => 'messages_screen_sentbox', 'position' => 20, 'user_has_access' => bp_is_home() ) );
    121     bp_core_new_subnav_item( array( 'name' => __( 'Compose', 'buddypress' ), 'slug' => 'compose', 'parent_url' => $messages_link, 'parent_slug' => $bp->messages->slug, 'screen_function' => 'messages_screen_compose', 'position' => 30, 'user_has_access' => bp_is_home() ) );
     119    bp_core_new_subnav_item( array( 'name' => __( 'Inbox', 'buddypress' ) . $count_indicator, 'slug' => 'inbox', 'parent_url' => $messages_link, 'parent_slug' => $bp->messages->slug, 'screen_function' => 'messages_screen_inbox', 'position' => 10, 'user_has_access' => bp_is_my_profile() ) );
     120    bp_core_new_subnav_item( array( 'name' => __( 'Sent Messages', 'buddypress' ), 'slug' => 'sentbox', 'parent_url' => $messages_link, 'parent_slug' => $bp->messages->slug, 'screen_function' => 'messages_screen_sentbox', 'position' => 20, 'user_has_access' => bp_is_my_profile() ) );
     121    bp_core_new_subnav_item( array( 'name' => __( 'Compose', 'buddypress' ), 'slug' => 'compose', 'parent_url' => $messages_link, 'parent_slug' => $bp->messages->slug, 'screen_function' => 'messages_screen_compose', 'position' => 30, 'user_has_access' => bp_is_my_profile() ) );
    122122
    123123    if ( is_site_admin() )
     
    125125
    126126    if ( $bp->current_component == $bp->messages->slug ) {
    127         if ( bp_is_home() ) {
     127        if ( bp_is_my_profile() ) {
    128128            $bp->bp_options_title = __( 'My Messages', 'buddypress' );
    129129        } else {
     
    305305    do_action( 'messages_action_view_message' );
    306306
    307     bp_core_new_subnav_item( array( 'name' => sprintf( __( 'From: %s', 'buddypress'), BP_Messages_Thread::get_last_sender($thread_id) ), 'slug' => 'view', 'parent_url' => $bp->loggedin_user->domain . $bp->messages->slug . '/', 'parent_slug' => $bp->messages->slug, 'screen_function' => true, 'position' => 40, 'user_has_access' => bp_is_home() ) );
     307    bp_core_new_subnav_item( array( 'name' => sprintf( __( 'From: %s', 'buddypress'), BP_Messages_Thread::get_last_sender($thread_id) ), 'slug' => 'view', 'parent_url' => $bp->loggedin_user->domain . $bp->messages->slug . '/', 'parent_slug' => $bp->messages->slug, 'screen_function' => true, 'position' => 40, 'user_has_access' => bp_is_my_profile() ) );
    308308    bp_core_load_template( apply_filters( 'messages_template_view_message', 'members/single/home' ) );
    309309}
  • trunk/bp-messages/bp-messages-templatetags.php

    r2375 r2389  
    451451        global $bp;
    452452
    453         if ( bp_is_home() || !is_user_logged_in() )
     453        if ( bp_is_my_profile() || !is_user_logged_in() )
    454454            return false;
    455455
  • trunk/bp-themes/bp-default/registration/register.php

    r2364 r2389  
    275275                    <?php endif; ?>
    276276
    277                 <?php else : ?>
    278 
    279                     <p><?php _e( "We've fetched an avatar for your new account. If you'd like to change this you can use the <a href=\"http://gravatar.com\">Gravatar</a> service to upload a new one.", 'buddypress' ) ?></p>
    280 
    281277                <?php endif; ?>
    282278
  • trunk/bp-themes/bp-sn-parent/activity/just-me.php

    r2168 r2389  
    2626                    <h4><?php echo bp_word_or_name( __( "My Activity", 'buddypress' ), __( "%s's Activity", 'buddypress' ), true, false ) ?> <span><a href="<?php bp_activities_member_rss_link() ?>" title="<?php _e( 'RSS Feed', 'buddypress' ) ?>"><?php _e( 'RSS Feed', 'buddypress' ) ?></a></span></h4>
    2727
    28                     <?php if ( is_user_logged_in() && bp_is_home() ) : ?>
     28                    <?php if ( is_user_logged_in() && bp_is_my_profile() ) : ?>
    2929
    3030                    <form action="" method="post" id="whats-new-form" name="whats-new-form">
     
    5454                    <div class="activity">
    5555
    56                     <?php if ( bp_has_activities( 'user_id=' . bp_displayed_user_id() . '&per_page=25&max=500&display_comments=stream&show_hidden=' . bp_is_home() ) ) : ?>
     56                    <?php if ( bp_has_activities( 'user_id=' . bp_displayed_user_id() . '&per_page=25&max=500&display_comments=stream&show_hidden=' . bp_is_my_profile() ) ) : ?>
    5757
    5858                        <ul id="activity-list" class="activity-list item-list">
  • trunk/bp-themes/bp-sn-parent/groups/group-loop.php

    r2168 r2389  
    5050            </div>
    5151
    52             <?php if ( bp_is_home() ) : ?>
     52            <?php if ( bp_is_my_profile() ) : ?>
    5353
    5454                <?php do_action( 'bp_before_random_groups_list' ) ?>
  • trunk/bp-themes/bp-sn-parent/profile/change-avatar.php

    r2386 r2389  
    2424
    2525                    <p id="current-avatar">
    26                         <?php bp_displayed_user_avatar( 'type=full') ?>
     26                        <?php bp_displayed_user_avatar( 'type=full' ) ?>
    2727                        <?php bp_displayed_user_avatar( 'type=thumb' ) ?>
    2828                    </p>
  • trunk/bp-themes/bp-sn-parent/profile/profile-loop.php

    r2077 r2389  
    4141
    4242        <div class="button-block">
    43             <?php if ( bp_is_home() || is_site_admin() ) : ?>
     43            <?php if ( bp_is_my_profile() || is_site_admin() ) : ?>
    4444
    4545                <?php bp_edit_profile_button() ?>
  • trunk/bp-xprofile.php

    r2381 r2389  
    169169 * @uses bp_core_add_nav_default() Sets which sub navigation item is selected by default
    170170 * @uses bp_core_add_subnav_item() Adds a sub navigation item to a nav item
    171  * @uses bp_is_home() Returns true if the current user being viewed is equal the logged in user
     171 * @uses bp_is_my_profile() Returns true if the current user being viewed is equal the logged in user
    172172 * @uses bp_core_fetch_avatar() Returns the either the thumb or full avatar URL for the user_id passed
    173173 */
     
    186186
    187187    if ( $bp->current_component == $bp->profile->slug ) {
    188         if ( bp_is_home() ) {
     188        if ( bp_is_my_profile() ) {
    189189            $bp->bp_options_title = __( 'My Profile', 'buddypress' );
    190190        } else {
     
    215215
    216216    /* Don't show this menu to non site admins or if you're viewing your own profile */
    217     if ( !is_site_admin() || bp_is_home() )
     217    if ( !is_site_admin() || bp_is_my_profile() )
    218218        return false;
    219219    ?>
     
    270270 *
    271271 * @package BuddyPress Xprofile
    272  * @uses bp_is_home() Checks to make sure the current user being viewed equals the logged in user
     272 * @uses bp_is_my_profile() Checks to make sure the current user being viewed equals the logged in user
    273273 * @uses bp_core_load_template() Looks for and loads a template file within the current member theme (folder/filename)
    274274 */
     
    357357 *
    358358 * @package BuddyPress Xprofile
    359  * @uses bp_is_home() Checks to make sure the current user being viewed equals the logged in user
     359 * @uses bp_is_my_profile() Checks to make sure the current user being viewed equals the logged in user
    360360 * @uses bp_core_load_template() Looks for and loads a template file within the current member theme (folder/filename)
    361361 */
     
    363363    global $bp;
    364364
    365     if ( !bp_is_home() && !is_site_admin() )
     365    if ( !bp_is_my_profile() && !is_site_admin() )
    366366        return false;
    367367
     
    432432    check_admin_referer( 'bp_delete_avatar_link' );
    433433
    434     if ( !bp_is_home() && !is_site_admin() )
     434    if ( !bp_is_my_profile() && !is_site_admin() )
    435435        return false;
    436436
Note: See TracChangeset for help on using the changeset viewer.