Closed chesio closed 6 years ago
Sure, please go ahead!
I've made a PR. I've added a did_action
check to ensure that any purge action registered by the filter that runs before after_setup_theme
triggers cache cleaning, so there should be no backwards compatibility issues.
Hi,
I'm trying to use
nginx_cache_purge_actions
filter to register additional actions that should flush Nginx cache, but I noticed that this filter is applied right when plugin is loaded, so there's no way how to use this filter from (child) theme.I understand this filter should be applied early, so one can register actions that are invoked early, but I would say running this filter in after_setup_theme hook should be early enough and would allow to use the filter from within themes.
If you're fine with my suggestion, I can make a pull request.