tormjens / eventy

WordPress-like actions and filters for Laravel

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to remove a Anonymous callable action

zotopteam opened this issue · comments

When i add a action:
Eventy::addAction('foo', function() { echo 'bar'; });

Then I want to remove it, How to do this?

Eventy::remove('foo', ……);

Good question. The function is anonymous so you wouldn't have a reference to it to remove it later on.

I'll try and come up with a solution for your issue. I'll get back to you!

@zotopteam I've implemented functionality for this with #17. Mind giving it a go?

Thanks, #17 is pretty!