Skip to content

Conversation

RaduCristianPopescu
Copy link

@RaduCristianPopescu RaduCristianPopescu commented Aug 29, 2025

All Submissions:

Changes proposed in this Pull Request:

Added compatibility with JetEngine Listing Grid "Load More" feature.

Before

CleanShot 2025-09-02 at 11 16 48@2x

After

CleanShot 2025-09-02 at 11 15 04@2x

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:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

Copy link
Contributor

@Copilot Copilot AI left a 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.

Comment on lines 29 to 30


Copy link
Preview

Copilot AI Aug 29, 2025

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.

Suggested change

Copilot uses AI. Check for mistakes.

@pirate-bot
Copy link
Collaborator

pirate-bot commented Aug 29, 2025

Plugin build for 3986b1e is ready 🛎️!

Copy link
Contributor

@selul selul left a 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.

Copy link
Contributor

@selul selul left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm 🚀

@selul selul merged commit 3b66c03 into development Sep 16, 2025
10 checks passed
@selul selul deleted the fix/jetengine-comp branch September 16, 2025 06:46
@selul selul mentioned this pull request Sep 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incompatibility with JetEngine Listing Grid "Load More" Feature
4 participants