Skip to content

Instantly share code, notes, and snippets.

@n7studios
Created November 11, 2014 10:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save n7studios/ac125e21024078de6438 to your computer and use it in GitHub Desktop.
Save n7studios/ac125e21024078de6438 to your computer and use it in GitHub Desktop.
Envira Gallery - Lightbox for Custom Images
<?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