Changeset 8546
- Timestamp:
- 06/24/2014 09:23:15 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-friends/bp-friends-template.php
r7828 r8546 188 188 189 189 /** 190 * Output the Add Friend button in member directories. 190 * Output the "Add Friend" button in the member loop. 191 * 192 * @since BuddyPress (1.2.6) 191 193 */ 192 194 function bp_member_add_friend_button() { 193 global $members_template; 194 195 if ( !isset( $members_template->member->is_friend ) || null === $members_template->member->is_friend ) 196 $friend_status = 'not_friends'; 197 else 198 $friend_status = ( 0 == $members_template->member->is_friend ) ? 'pending' : 'is_friend'; 199 200 echo bp_get_add_friend_button( $members_template->member->id, $friend_status ); 195 bp_add_friend_button( bp_get_member_user_id() ); 201 196 } 202 197 add_action( 'bp_directory_members_actions', 'bp_member_add_friend_button' );
Note: See TracChangeset
for help on using the changeset viewer.