Upgrade to WordPress 2.8 and Lightbox

Very fast affair through the admin interface ! Unfortunately it broke my lightbox jQuery implementation. I did manage to get it working again by using this lightbox 0.5 version and adding

jQuery("a[rel*='lightbox']").lightBox(); // Select all links that contains lightbox in the attribute rel

to my js init script. I might take another look at it soon, to get the other one working again as that was a bit better with grouping support…

Not quite sure what’s better about 2.8, I hope the mysterious WEBSTAT iframe injections will be gone, as that was a PITA with 2.7.1.

UPDATE: Managed to get this plugin to work. Edit the mainplugin php a bit as it’s no longer needed to de_queue the default jquery script. WP 2.8 comes out of the box with jQuery 1.3.2.

So this is what it looks like:

wp_enqueue_script('jquery');
wp_enqueue_script('jquery-lightbox', $path.'jquery.lightbox.min.js', array('jquery'), '1.3.2');
wp_enqueue_script('jquery-lightbox-plugin', $path.'jquery.lightbox.plugin.min.js', array('jquery', 'jquery-lightbox'), '1.0');
optical amplifier

Published by

Eric

Basically I have too many interests. I like to read, play PC games (Kerbal Space Program and WoW are currently my favorites), watch movies, listen to music, and tweak PC's, browse the web and read news on Reddit and internet forums . I work for a small company as a software engineer.