Skip to content

Instantly share code, notes, and snippets.

@bryanmonzon
Created March 14, 2014 23:14
Show Gist options
  • Save bryanmonzon/9558999 to your computer and use it in GitHub Desktop.
Save bryanmonzon/9558999 to your computer and use it in GitHub Desktop.
scripts.php
<?php
/**
* GMC Functions
*
* @package GMC
*
* @since 1.0
*/
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) exit;
/**
* Load Scripts for the site
*
* @since 1.0
* @author Bryan Monzon
* @return [void]
*/
function imag_enqueue_scripts_styles()
{
$js_path = get_stylesheet_directory_uri() . '/assets/js/';
wp_register_script( 'imag-scripts', $js_path. 'app.js', array('jquery'), IMAG_VERSION, true );
wp_enqueue_script( 'imag-scripts' );
wp_register_style( 'imag-styles', get_stylesheet_directory_uri() . '/style.css', '', IMAG_VERSION, $media );
wp_enqueue_style('imag-styles');
}
add_action( 'wp_enqueue_scripts', 'imag_enqueue_scripts_styles', 100 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment