Adding Support For jQuery Colorbox
-
Hello,
I use jQuery Colorbox and noticed it currently wasn’t supported by Meta Slider Lightbox. I used the code added for WP-Colorbox and made the necessary change to get jQuery Colorbox to work.
For those using this fantastic slider and want to use jQuery Colorbox, here’s what you need to add.
Find (Around line 120)
} elseif (is_plugin_active("responsive-lightbox/responsive-lightbox.php")) {
Add above
} elseif (is_plugin_active("jquery-colorbox/jquery-colorbox.php")) { if (!strlen($attributes['href'])) { $attributes['href'] = wp_get_attachment_url($slide['id']); $attributes['rel'] = "lightbox[{$slider_id}]"; $attributes['class'] = "cboxElement"; }
Find (Around line 211)
(is_plugin_active("responsive-lightbox/responsive-lightbox.php") == true ? "activated" : "not-active")
Add Above
(is_plugin_active("jquery-colorbox/jquery-colorbox.php") == true ? "activated" : "not-active"),
This last part involves adding to an existing part of the code so make sure everything is correct.
Find (Starting at line 301)
} elseif (is_plugin_active("wp-video-lightbox/wp-video-lightbox.php")) { $active_lightbox = "WP Video Lightbox"; $lightbox_settings_url = "/options-general.php?page=wp_video_lightbox"; }
Replace With
} elseif (is_plugin_active("wp-video-lightbox/wp-video-lightbox.php")) { $active_lightbox = "WP Video Lightbox"; $lightbox_settings_url = "/options-general.php?page=wp_video_lightbox"; } } elseif (is_plugin_active("jquery-colorbox/jquery-colorbox.php")) { $active_lightbox = "jQuery Colorbox"; $lightbox_settings_url = "/options-general.php?page=jquery-colorbox/jquery-colorbox.php"; }
That’s it! Now Meta Slider will work with jQuery Colorbox.
- The topic ‘Adding Support For jQuery Colorbox’ is closed to new replies.