Last active
December 19, 2015 10:48
-
-
Save amdrew/5942621 to your computer and use it in GitHub Desktop.
Load the required JS call in footer for Easy Image Gallery
http://wordpress.org/plugins/easy-image-gallery/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function my_theme_easy_image_gallery_js() { | |
$lightbox = function_exists( 'easy_image_gallery_get_lightbox' ) ? easy_image_gallery_get_lightbox() : ''; | |
if ( 'colorbox' == $lightbox ) { ?> | |
<script> | |
jQuery(document).ready(function() { | |
jQuery("a[rel^='colorbox']").colorbox(); | |
}); | |
</script> | |
<?php } | |
} | |
add_action( 'easy_image_gallery_js', 'my_theme_easy_image_gallery_js' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment