I need this hook to manage changes in groups connected with all sites. (for example in ClickPath plugin)
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"
@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!