wp-rocket
wp-rocket copied to clipboard
Call callback outside preload
Description
For the lighthouse plugin we use the cache to generation to launch the test for the page.
Due to that we need to run cache generation outside preload to make the loading faster and so we need to activate the callback outside of preload.
For that we inverted the condition on this line .
Type of change
- [ ] Bug fix (non-breaking change which fixes an issue)
How Has This Been Tested?
- [ ] Manual Test
Checklist:
- [ ] My code follows the style guidelines of this project
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] Any dependent changes have been merged and published in downstream modules