Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/09/2010 08:11:08 PM (14 years ago)
Author:
johnjamesjacoby
Message:

Fixes #2567 props jeffsayre.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.2/bp-friends/bp-friends-templatetags.php

    r3143 r3162  
    136136
    137137        $button = '<div class="generic-button friendship-button ' . $friend_status . '" id="friendship-button-' . $potential_friend_id . '">';
    138         if ( 'pending' == $friend_status ) {
     138
     139        if ( 'pending' == $friend_status )
    139140            $button .= '<a class="requested" href="' . $bp->loggedin_user->domain . $bp->friends->slug . '/">' . __( 'Friendship Requested', 'buddypress' ) . '</a>';
    140         } else if ( 'is_friend' == $friend_status ) {
     141        else if ( 'is_friend' == $friend_status )
    141142            $button .= '<a href="' . wp_nonce_url( $bp->loggedin_user->domain . $bp->friends->slug . '/remove-friend/' . $potential_friend_id . '/', 'friends_remove_friend' ) . '" title="' . __('Cancel Friendship', 'buddypress') . '" id="friend-' . $potential_friend_id . '" rel="remove" class="remove">' . __('Cancel Friendship', 'buddypress') . '</a>';
    142         } else {
     143        else
    143144            $button .= '<a href="' . wp_nonce_url( $bp->loggedin_user->domain . $bp->friends->slug . '/add-friend/' . $potential_friend_id . '/', 'friends_add_friend' ) . '" title="' . __('Add Friend', 'buddypress') . '" id="friend-' . $potential_friend_id . '" rel="add" class="add">' . __('Add Friend', 'buddypress') . '</a>';
    144         }
     145
    145146        $button .= '</div>';
    146147
    147         return apply_filters( 'bp_get_add_friend_button', $button );
     148        return apply_filters( 'bp_get_add_friend_button', $button, $potential_friend_id, $friend_status );
    148149    }
    149150
Note: See TracChangeset for help on using the changeset viewer.