Created
August 23, 2012 16:21
-
-
Save norcross/3438225 to your computer and use it in GitHub Desktop.
using wp_enqueue_scripts and admin_enqueue_scripts
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
// front end | |
function custom_front_scripts() { | |
wp_enqueue_style( 'front-css', plugins_url('/lib/css/front-css.css', __FILE__), array(), null, 'all' ); | |
wp_enqueue_script( 'front-init', plugins_url('/lib/js/front.init.js', __FILE__) , array('jquery'), null, true ); | |
} | |
add_action('wp_enqueue_scripts', 'custom_front_scripts' ); | |
// back end | |
function custom_admin_scripts() { | |
wp_enqueue_style( 'admin-css', plugins_url('/lib/css/admin.css', __FILE__), array(), null, 'all' ); | |
wp_enqueue_script( 'admin-init', plugins_url('/lib/js/admin.init.js', __FILE__) , array('jquery'), null, true ); | |
} | |
add_action('admin_enqueue_scripts', 'custom_admin_scripts' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment