Skip to content

Instantly share code, notes, and snippets.

View dwood7399's full-sized avatar

David Woodham dwood7399

View GitHub Profile
@dwood7399
dwood7399 / enqueue-scripts.php
Created March 22, 2014 19:39
Enqueue JS from dev files when WP_DEBUG is true, else enqueue combined, minimized file
//
// Enqueue JS from dev files or combined, minimized file
//
if( ! function_exists( 'bfc_enqueue_script' ) ) {
function bfc_enqueue_script()
{
if ( defined('WP_DEBUG') AND WP_DEBUG ) {
wp_enqueue_script('lazyload', get_stylesheet_directory_uri().'/js/dev/jquery.lazyload.js', array( 'jquery' ), null, true );