[buddypress-trac] [BuddyPress] #3039: Leave group / Cancel Friendship buttons
buddypress-trac at lists.automattic.com
buddypress-trac at lists.automattic.com
Fri Feb 11 22:13:41 UTC 2011
#3039: Leave group / Cancel Friendship buttons
---------------------+-------------------------------
Reporter: gwu123 | Owner:
Type: defect | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Theme | Version:
Resolution: | Keywords: reporter-feedback
---------------------+-------------------------------
Comment (by sbrajesh):
I can confirm this bug in the bp 1.2.7. The cancel friendship button will
not appear in profile.
The problem is with bp_get_add_friend_button() code in bp-friends-
template-tags.php.
You need to set the block_self=false for is_friend case
{{{
case 'is_friend' :
$button = array(
'id' =>
'is_friend',
'component' => 'friends',
'must_be_logged_in' => true,
'block_self' =>
false,//this is set true which causes the problem
'wrapper_class' =>
'friendship-button is_friend',
'wrapper_id' =>
'friendship-button-' . $potential_friend_id,
'link_class' => '',
'link_href' =>
wp_nonce_url( $bp->loggedin_user->domain . $bp->friends->slug . '/remove-
friend/' . $potential_friend_id . '/', 'friends_remove_friend' ),
'link_text' => __( 'Cancel
Friendship', 'buddypress' ),
'link_title' => __( 'Cancel
Friendship', 'buddypress' ),
'link_id' => 'friend-' .
$potential_friend_id,
'link_rel' => 'remove',
'link_class' => 'remove'
);
break;
}}}
But I can't find the same issue with Groups.
--
Ticket URL: <https://trac.buddypress.org/ticket/3039#comment:2>
BuddyPress <http://buddypress.org/>
BuddyPress
More information about the buddypress-trac
mailing list