Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/12/2011 01:52:18 AM (14 years ago)
Author:
johnjamesjacoby
Message:

Audit the usage of $bp->activity->slug. See #3325.

File:
1 edited

Legend:

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

    r4611 r4646  
    249249
    250250    // Support for permalinks on single item pages: /groups/my-group/activity/124/
    251     if ( $bp->current_action == $bp->activity->slug )
     251    if ( bp_is_current_action( bp_get_activity_slug() ) )
    252252        $include = $bp->action_variables[0];
    253253
     
    10321032        global $bp;
    10331033       
    1034         $link = wp_nonce_url( bp_get_root_domain() . '/' . $bp->activity->slug . '/delete/?cid=' . bp_get_activity_comment_id(), 'bp_activity_delete_link' );
     1034        $link = wp_nonce_url( bp_get_root_domain() . '/' . bp_get_activity_slug() . '/delete/?cid=' . bp_get_activity_comment_id(), 'bp_activity_delete_link' );
    10351035       
    10361036        return apply_filters( 'bp_activity_comment_delete_link', $link );
     
    13641364            return false;
    13651365
    1366         return apply_filters( 'bp_get_send_public_message_link', wp_nonce_url( $bp->loggedin_user->domain . $bp->activity->slug . '/?r=' . bp_core_get_username( $bp->displayed_user->id, $bp->displayed_user->userdata->user_nicename, $bp->displayed_user->userdata->user_login ) ) );
     1366        return apply_filters( 'bp_get_send_public_message_link', wp_nonce_url( bp_loggedin_user_domain() . bp_get_activity_slug() . '/?r=' . bp_core_get_username( $bp->displayed_user->id, $bp->displayed_user->userdata->user_nicename, $bp->displayed_user->userdata->user_login ) ) );
    13671367    }
    13681368
     
    14401440        global $bp;
    14411441
    1442         if ( $bp->current_component == $bp->profile->slug || 'just-me' == $bp->current_action )
    1443             $link = $bp->displayed_user->domain . $bp->activity->slug . '/feed/';
    1444         elseif ( bp_is_active( 'friends' ) && $bp->friends->slug == $bp->current_action )
    1445             $link = $bp->displayed_user->domain . $bp->activity->slug . '/' . $bp->friends->slug . '/feed/';
    1446         elseif ( bp_is_active( 'groups' ) && $bp->groups->slug == $bp->current_action )
    1447             $link = $bp->displayed_user->domain . $bp->activity->slug . '/' . $bp->groups->slug . '/feed/';
     1442        if ( bp_is_profile_component() || bp_is_current_action( 'just-me' ) )
     1443            $link = bp_displayed_user_domain() . bp_get_activity_slug() . '/feed/';
     1444        elseif ( bp_is_active( 'friends' ) && bp_is_current_action( bp_get_friends_slug() ) )
     1445            $link = bp_displayed_user_domain() . bp_get_activity_slug() . '/' . bp_get_friends_slug() . '/feed/';
     1446        elseif ( bp_is_active( 'groups'  ) && bp_is_current_action( bp_get_groups_slug()  ) )
     1447            $link = bp_displayed_user_domain() . bp_get_activity_slug() . '/' . bp_get_groups_slug() . '/feed/';
    14481448        elseif ( 'favorites' == $bp->current_action )
    1449             $link = $bp->displayed_user->domain . $bp->activity->slug . '/favorites/feed/';
     1449            $link = bp_displayed_user_domain() . bp_get_activity_slug() . '/favorites/feed/';
    14501450        elseif ( 'mentions' == $bp->current_action )
    1451             $link = $bp->displayed_user->domain . $bp->activity->slug . '/mentions/feed/';
     1451            $link = bp_displayed_user_domain() . bp_get_activity_slug() . '/mentions/feed/';
    14521452        else
    14531453            $link = '';
Note: See TracChangeset for help on using the changeset viewer.