New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add SitesManager.addSite.end hook at the end of addSite function. #222
Add SitesManager.addSite.end hook at the end of addSite function. #222
Conversation
Thinking about this.. should we maybe automatically trigger before/after events before/after we call the API method. Otherwise we might end up adding more of those over time. |
I think that triggering events before and after every API call is not necessary. In my opinion most of them will be using in custom, special cases. Few of them, for "special occasions" should be enough. |
The hook is called SitesManager.addSite.end but it is located in the function postUpdateWebsite which is itself called when a site is created, updated, alias URL updated. Do you need the hook to trigger only when site is created? in which case it should be in the function "addSite" |
Conflicts: plugins/SegmentEditor/API.php
…olnowski/piwik into SitesManager-API-addSite-hook
@mattab: You're right. Hook has been moved into addSite method. |
I can't merge this PR, as you can see it's very long and has lots of code unrelated to it. I'll fix it separately! |
I need this hook to manage changes in groups connected with all sites. (for example in ClickPath plugin)