Skip to content

Make jp_carousel_load_for_images_linked_to_file filter works when Photon is activated#6243

Closed
stoyan0v wants to merge 1 commit intoAutomattic:masterfrom
stoyan0v:fix/photon-carousel-conflict
Closed

Make jp_carousel_load_for_images_linked_to_file filter works when Photon is activated#6243
stoyan0v wants to merge 1 commit intoAutomattic:masterfrom
stoyan0v:fix/photon-carousel-conflict

Conversation

@stoyan0v
Copy link
Copy Markdown
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. 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
Copy Markdown
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

Bug When a feature is broken and / or not performing as intended [Feature] Carousel A fullscreen modal appearing when clicking on an image in a gallery or tiled gallery.

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