You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have already written two "after" functions for SSG, one to do some URL rewriting and one to generate HTML redirect pages. It seems to me that different addon authors might want to create their own SSG::after functions as well. But it seems that only the last SSG::after function is saved and called by SSG (see the definition in /src/Generator.php...
Wouldn't it make more sense to allow multiple functions to be "registered" and called, so that multiple addons might hook onto the tail end of a static site generation to do whatever cleanup they need for their own data?
I'm not sure how to best accomplish this, probably does not need to be as sophisticated as the WP hook mechanism (though that is not a bad model, and accounts for things like managing the order of callback). Maybe even just a simple array of after callbacks would be enough?
The text was updated successfully, but these errors were encountered:
I have already written two "after" functions for SSG, one to do some URL rewriting and one to generate HTML redirect pages. It seems to me that different addon authors might want to create their own
SSG::after
functions as well. But it seems that only the last SSG::after function is saved and called by SSG (see the definition in/src/Generator.php
...Wouldn't it make more sense to allow multiple functions to be "registered" and called, so that multiple addons might hook onto the tail end of a static site generation to do whatever cleanup they need for their own data?
I'm not sure how to best accomplish this, probably does not need to be as sophisticated as the WP hook mechanism (though that is not a bad model, and accounts for things like managing the order of callback). Maybe even just a simple array of after callbacks would be enough?
The text was updated successfully, but these errors were encountered: