-
Notifications
You must be signed in to change notification settings - Fork 0
/
wnet-everyaction-wp-css-and-js.php
35 lines (29 loc) · 1.23 KB
/
wnet-everyaction-wp-css-and-js.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
<?php
/*
Plugin Name: WNET EveryAction WP CSS and JS
Description: A container to maintain the custom JS and CSS for embedded EveryAction forms on WNET sites
Version: 2023.03.23
Authors: WNET Digital (plugin), MWD (JS and CSS)
*/
class WNET_EveryAction_WP_CSS_and_JS {
private $dir;
private $file;
public $assets_url;
public $token;
public $version;
public function __construct() {
$this->version = '2024.12.05';
/* use today's date in the line above in 'xxxx.xx.xx' format to make sure CloudFront is using this version.
* If including the script elsewhere, it is generally best to also include that date as a query string
*/
$this->assets_url = esc_url( trailingslashit( plugins_url( '/assets/', __FILE__ ) ) );
$this->token = 'wnet_everyaction_wp';
}
public function enqueue_scripts() {
// this will register and enqueue the assets in the specific template(s) that need them
wp_register_script( $this->token . '_js' , $this->assets_url . 'js/ea-donate-form.js', array('jquery'), $this->version, true );
wp_enqueue_script( $this->token . '_js' );
wp_enqueue_style( $this->token . '_css', $this->assets_url . 'css/ea-donate-form-theme-styles.css', null, $this->version);
}
}
/* EOF */