Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/06/2009 03:07:48 AM (16 years ago)
Author:
apeatling
Message:

Converted $bp as an array to $bp as an object. See this post for more info: http://buddypress.org/forums/topic.php?id=1125

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-activity/bp-activity-templatetags.php

    r933 r1021  
    2424       
    2525        if ( !$user_id )
    26             $user_id = $bp['current_userid'];
    27 
    28         if ( $bp['current_component'] != $bp['activity']['slug'] || ( $bp['current_component'] == $bp['activity']['slug'] && $bp['current_action'] == 'just-me' || $bp['current_action'] == 'feed' ) ) {
     26            $user_id = $bp->displayed_user->id;
     27
     28        if ( $bp->current_component != $bp->activity->slug || ( $bp->current_component == $bp->activity->slug && $bp->current_action == 'just-me' || $bp->current_action == 'feed' ) ) {
    2929            $this->activities = BP_Activity_Activity::get_activity_for_user( $user_id, $limit );
    3030        } else {
     
    3434        $this->activity_count = count($this->activities);
    3535   
    36         $this->full_name = $bp['current_fullname'];
     36        $this->full_name = $bp->displayed_user->fullname;
    3737
    3838        $this->is_home = bp_is_home();
     
    9999    global $bp, $activities_template, $bp_activity_user_id, $bp_activity_limit;
    100100   
    101     if ( $bp['current_action'] == 'my-friends' )
     101    if ( $bp->current_action == 'my-friends' )
    102102        $filter_content = false;
    103103    else
     
    105105   
    106106    if ( !$bp_activity_user_id )
    107         $bp_activity_user_id = $bp['current_userid'];
     107        $bp_activity_user_id = $bp->displayed_user->id;
    108108   
    109109    if ( !$bp_activity_limit )
     
    200200    global $bp;
    201201   
    202     echo apply_filters( 'bp_sitewide_activity_feed_link', site_url() . '/' . $bp['activity']['slug'] . '/feed' );
     202    echo apply_filters( 'bp_sitewide_activity_feed_link', site_url() . '/' . $bp->activity->slug . '/feed' );
    203203}
    204204
     
    206206    global $bp;
    207207   
    208     if ( ( $bp['current_component'] == $bp['profile']['slug'] ) || $bp['current_action'] == 'just-me' )
    209         echo apply_filters( 'bp_activities_member_rss_link', $bp['current_domain'] . $bp['activity']['slug'] . '/feed' );
     208    if ( ( $bp->current_component == $bp->profile->slug ) || $bp->current_action == 'just-me' )
     209        echo apply_filters( 'bp_activities_member_rss_link', $bp->displayed_user->domain . $bp->activity->slug . '/feed' );
    210210    else
    211         echo apply_filters( 'bp_activities_member_rss_link', $bp['current_domain'] . $bp['activity']['slug'] . '/my-friends/feed' );       
     211        echo apply_filters( 'bp_activities_member_rss_link', $bp->displayed_user->domain . $bp->activity->slug . '/my-friends/feed' );     
    212212}
    213213
Note: See TracChangeset for help on using the changeset viewer.