[buddypress-trac] [BuddyPress] #5019: Fire 'friends_friendship_deleted' hook after delete friendship.

buddypress-trac noreply at wordpress.org
Sat May 25 06:45:52 UTC 2013


#5019: Fire 'friends_friendship_deleted' hook after delete friendship.
---------------------------+-----------------------------
 Reporter:  mukkundthanki  |      Owner:
     Type:  defect (bug)   |     Status:  new
 Priority:  normal         |  Milestone:  Awaiting Review
Component:  Friends        |    Version:  1.7
 Severity:  normal         |   Keywords:
---------------------------+-----------------------------
 In function 'friends_remove_friend', we fire 'friends_friendship_deleted'
 hook and then we delete friendship and then update friends total.

 Actually I need friends total after friendship deleted. I can hook my
 function to 'friends_friendship_deleted' but total updates after it. My
 suggestion is

 {{{
 if ( $friendship->delete() ) {
         friends_update_friend_totals( $initiator_userid, $friend_userid,
 'remove' );

         do_action( 'friends_friendship_deleted', $friendship_id,
 $initiator_userid, $friend_userid );

         return true;
 }
 }}}

--
Ticket URL: <https://buddypress.trac.wordpress.org/ticket/5019>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list