Skip to content

Instantly share code, notes, and snippets.

@dbernar1
Created December 7, 2014 23:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dbernar1/21776351ea6e00f06065 to your computer and use it in GitHub Desktop.
Save dbernar1/21776351ea6e00f06065 to your computer and use it in GitHub Desktop.
Enqueueing scripts from within a plugin file
<?php
/**
* Plugin Name: Plugin name
*/
add_action( 'wp_enqueue_scripts', 'enqueue_scripts__pluginname' );
function enqueue_scripts__pluginname() {
$jquery_location = WP_PLUGIN_URL . "/panomanager/js/jquery.js";
wp_register_script('jquery', $jquery_location, true);
wp_enqueue_script('jquery');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment