Create + Replace file hook, single call

If I want to react both to create and replace file hooks without repeating myself, is my only option to register a plugin, declare a function and call the function within each hook (as it is done here) ? can I do this in config somehow ?

Thanks

I wouldn’t put a function into the config file. Put the function plus the hooks into a plugin. Much cleaner.

1 Like