fix: Incompatibility with JetEngine#952
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR adds compatibility with the JetEngine WordPress plugin, specifically for their Listing Grid "Load More" AJAX feature. The changes ensure that Optimole's image optimization works correctly when loading additional content via JetEngine's AJAX endpoints.
Key changes:
- Added JetEngine to the list of compatible plugins
- Created a new compatibility class that hooks into JetEngine's AJAX load more events
- Ensured the tag replacer is properly set up for POST requests from JetEngine
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| inc/manager.php | Added 'jetengine' to the compatibility plugins array |
| inc/compatibilities/jetengine.php | New compatibility class implementing JetEngine integration logic |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
|
||
|
|
There was a problem hiding this comment.
[nitpick] Remove the extra blank line before the docblock comment to maintain consistent code formatting.
selul
left a comment
There was a problem hiding this comment.
Here this wont work well with the client optimization, i.e viewport based lazyloading which on the current implementation it might throw a fatal error or not work correctly.
We need to run the replacer directly on the content that it outputs with partial flag, like the rest of compatibilities, i.e https://github.com/Codeinwp/optimole-wp/blob/master/inc/compatibilities/yith_quick_view.php
Also I think the screenshots are the same since both of them show that the urls are properly replaced.
|
🎉 This PR is included in version 4.1.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
All Submissions:
Changes proposed in this Pull Request:
Added compatibility with JetEngine Listing Grid "Load More" feature.
Before
After
Closes #860
How to test the changes in this Pull Request:
Follow the instructions from the issue.
Note
You will need the JetEngine plugin.
Other information: