Created
November 11, 2014 10:18
-
-
Save n7studios/ac125e21024078de6438 to your computer and use it in GitHub Desktop.
Envira Gallery - Lightbox for Custom Images
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 | |
/** | |
* Plugin Name: Envira Gallery - Lightbox for Custom Images | |
* Plugin URI: http://enviragallery.com | |
* Version: 1.0 | |
* Author: Tim Carr | |
* Author URI: http://www.n7studios.co.uk | |
* Description: Registers an .envirabox class that you can use on images to display them in the Envira Lightbox | |
*/ | |
/** | |
* Always enqueue Envira CSS and JS | |
*/ | |
function frontend_header() { | |
wp_enqueue_style( 'envira-gallery-style' ); | |
wp_enqueue_script( 'envira-gallery-script' ); | |
} | |
add_action('wp_head', 'frontend_header', 99); | |
/** | |
* Register Envirabox for .envirabox class images | |
*/ | |
function frontend_footer() { | |
?> | |
<script type="text/javascript">jQuery('.envirabox').envirabox();</script> | |
<?php | |
} | |
add_action('wp_footer', 'frontend_footer', 99); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment