View difference between Paste ID: S45KrNyz and pHe1Cpns
SHOW: | | - or go back to the newest paste.
1
<?php
2
3
/*
4-
Plugin Name: Load The D3 Script
4+
Plugin Name: rhl: Load D3
5
*/
6
7-
add_action( 'init', 'rhl_theme_init' );
7+
add_action( 'init', 'rhl_load_d3' );
8
9-
function rhl_theme_init() {
9+
function rhl_load_d3() {
10
	if ( ! is_admin() ) {
11-
		wp_enqueue_script( 'd3', get_template_directory_uri() . '/d3/d3.js', array(), 'optional_version_number_string' );
11+
		wp_enqueue_script( 'd3', plugins_url( 'd3/d3.js', __FILE__ ), array(), '2.5.0' );
12
	}
13
}
14
15
16
17