Skip to content

Conversation

efc
Copy link

@efc efc commented Aug 9, 2025

This implements a method of allowing more than one after callback, as requested in #182.

It adds an option $id parameter to the SSG::after method that defaults to "unidentified". This means that all existing calls to SSG::after will work as they always have, overwriting one another. However, if one supplies an identifier string, then the callback function will be added to an array of callback functions instead of overwriting previous after callbacks.

One can also specify identifiers that should be skipped using the new SSG::skipAfter method. This allows you to explicitly prevent after callbacks from other parties from being run (for example, if you supply similar functionality yourself or you have found that their callback is incompatible with your use case).

Finally, it uses the identifiers to inform the user which after callbacks are being run or skipped.

Note the reversion in composer.json is probably not necessary, but was required to get the addon installed on my system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant