BuddyPress-Like icon indicating copy to clipboard operation
BuddyPress-Like copied to clipboard

Hook on like

Open fried-eggz opened this issue 8 years ago • 2 comments

I've added a hook that fires when a new like is registered. This enables us to do stuff when an item is liked.

I see in the code that you are preparing to add notifications and that you have added hooks to the different activity types. However, it would be nice to also have a general hook that fires no matter what the type is.

This hook also makes it possible to add support for likes on custom post types and not only activity updates and blog posts.

I have implemented like notifications for all post types using this hook and I thought I might issue a PR to see if you would consider adding it to the plugin.

fried-eggz avatar Dec 25 '15 01:12 fried-eggz

Thanks for this @fried-eggz , I'm going to hold off adding it in, as with all the work being developed, I'l need to spend some time reviewing what hooks we need. I'd like to make some consistancy between them all too, as well as using a more consistent naming scheme - I'm beginning all names with bplike_ vs bp_like.

darrenmeehan avatar Dec 25 '15 15:12 darrenmeehan

Sounds good! Keeping things consistent is very important as you code base grows. I would hovever like to stress the importance of a general hook that fires on all types OR implementing a more abstract way of adding notifications that work on all post types.

fried-eggz avatar Dec 25 '15 18:12 fried-eggz