forked from spellerberg/vms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vmswp.php
44 lines (29 loc) · 1.04 KB
/
vmswp.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
/*
Plugin Name: Visitor Motivation Survey
Plugin URI: https://github.com/spellerberg/vms
Description: Includes the VMS code in a WordPress site
Version: 0.1
Author: Spellerberg Associates
Author URI: http://spellerbergassociates.com/vms
*/
// Enqueue Scripts
add_action('wp_enqueue_scripts', 'vms_enqueue_scripts');
function vms_enqueue_scripts() {
$version = "0.1";
if(!wp_script_is('jquery')) wp_enqueue_script("jquery");
$cookiejs = plugins_url( '/lib/js.cookie.js' , __FILE__ );
wp_register_script('cookiejs',$cookiejs, false, $version);
wp_enqueue_script( 'cookiejs',array('jquery'));
$vmsjs = plugins_url( '/src/vms.js' , __FILE__ );
wp_register_script('vmsjs',$vmsjs, false, $version);
wp_enqueue_script( 'vmsjs',array('jquery','cookiejs'));
$vmscss = plugins_url( '/src/vms.css' , __FILE__ );
wp_register_style('vmscss',$vmscss, false, $version);
wp_enqueue_style( 'vmscss');
}
// Include Markup
add_filter( 'wp_footer' , 'vms_addhtml' );
function vms_addhtml() {
include( plugin_dir_path( __FILE__ ) . 'src/vms.html');
}