Not only it opens for galleries, but it also reacts to keyboard interactions with Jetpack. Can you please fix this or assist me for a fix? Thanks a lot!
Just in case others people need a solution, for now, I have found a functional solution by editing 2 plugin files. At least in my installation, now it does not run Lightbox Plus for Jetpack’s Tiled Gallery images.
1. In lightboxplus.php
I disabled the else
after line 237 as it is useless in our case
//else {
//remove_shortcode( 'gallery' );
//add_shortcode( 'gallery', array( &$this, 'lightboxPlusGallery' ), 6);
//add_filter( 'the_content', array( &$this, 'filterLightboxPlusReplace' ), 11 );
//}
2. In classes/actions.class.php
I added a new check in the part that checks all image links; we check if the current link has a grandparent having the class tiled-gallery-item
. If it has this class, it is an image of Jetpack’s tiled-gallery. It is somewhere around line 150.
After
foreach($html->find('a[href*=jpg$] img, a[href*=gif$] img, a[href*=png$] img, a[href*=jpeg$] img, a[href*=bmp$] img') as $e) {
/**
* Generate HTML5 yes/no
*/
Add our condition:
$e1 = $e->parent();
if (strpos($e1->parent()->class, 'tiled-gallery-item') !== false) {
break;
}