-
Notifications
You must be signed in to change notification settings - Fork 12
fix: Incompatibility with JetEngine #952
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
inc/compatibilities/jetengine.php
Outdated
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] Remove the extra blank line before the docblock comment to maintain consistent code formatting.
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm 🚀
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: