Skip to content
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

Make jp_carousel_load_for_images_linked_to_file filter works when Photon is activated #6243

Closed

Conversation

stoyan0v
Copy link
Contributor

@stoyan0v stoyan0v commented Feb 1, 2017

Fixes #6054

If we have add_filter( 'jp_carousel_load_for_images_linked_to_file', '__return_true' ); and Photon activated, single image carousel doesn't work.

There is a check, that fails because Photon adds ?fit= parameter to image URL in data-orig-file attribute.
A variable that contains the URL, with omitted attributes, used in the if statement fix the problem.

Testing instructions:

  • Set add_filter( 'jp_carousel_load_for_images_linked_to_file', '__return_true' );
  • Activate Photon and Carousel
  • Create a post with an image that is linked to its' full size file
  • Click on the image on the frontend
  • It should be open in lightbox

@jeherve jeherve added this to the 4.7.0 - March 2017 milestone Feb 1, 2017
@jeherve jeherve added [Feature] Carousel A fullscreen modal appearing when clicking on an image in a gallery or tiled gallery. [Status] Needs Review This PR is ready for review. [Type] Bug When a feature is broken and / or not performing as intended labels Feb 1, 2017
@jeherve jeherve requested a review from samhotchkiss February 1, 2017 13:12
@samhotchkiss samhotchkiss removed this from the 4.7.0 - March 2017 milestone Feb 3, 2017
@rcoll
Copy link
Member

rcoll commented Feb 7, 2017

This was already fixed in #6296 - will send props to Stoyan0v also :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Carousel A fullscreen modal appearing when clicking on an image in a gallery or tiled gallery. [Type] Bug When a feature is broken and / or not performing as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

jp_carousel_load_for_images_linked_to_file filter doesn't work when Photon is activated
5 participants