I’ve discovered that the great plugin Flickr Mini Gallery conflicts with Lightbox Plus (and probably any other plugins that implement jQuery using the wp_enqueue_script('jquery');
method.
I took a look at the code and have created a hotfix for version 1.0 of Flick Mini Gallery.
Here’s how to fix the issue:
- Download the file [Download not found]
- Place
flickr_mini_gallery.php
in.../wp-content/plugins/flickr-mini-gallery
directory. - Place
flickr_mini_gallery.php
in.../wp-content/plugins/flickr-mini-gallery/js
directory.
That’s all. Now you shouldn’t have any jQuery conflicts anymore.
Here’s a break down of the changes:
Add these lines to your miniflickr.js file
At line 2 after initial comment: jQuery(function($){
Add at end of file: });
Replaced the jquery_lightbox_scripts()
function in flickr_mini_gallery.php
with this:
//add jquery and lightbox
function jquery_lightbox_scripts(){
$path = '/wp-content/plugins/flickr-mini-gallery/js';
wp_enqueue_script('jquery');
$opts = mfg_get_options();
$format = $opts['mfg_thumbformat'];
echo '';
echo '';
wp_enqueue_script('jquerylightbox', $path.'/jquery.lightbox-0.5.js', array('jquery'),'0.5');
wp_enqueue_script('miniflickr', $path.'/miniflickr.js', array('jquery'),'0.1');
}
Leave a Reply