-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtracker.php
More file actions
31 lines (24 loc) · 874 Bytes
/
tracker.php
File metadata and controls
31 lines (24 loc) · 874 Bytes
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
<?php
/**
* Plugin Name: tracker
* Description: A simple tracking plugin with configurable tracking methods
* Version: 1.0.0
*/
// Prevent direct access
if (!defined('ABSPATH')) {
exit;
}
// Include the admin class
require_once plugin_dir_path(__FILE__) . 'classes/class-admin.php';
$method = get_option('tracker_tracking_method', 'js_tracking');
if($method == 'js_tracking'){
require_once plugin_dir_path(__FILE__) . 'classes/class-js-tracking.php';
}
if($method == 'content_buffer'){
require_once plugin_dir_path(__FILE__) . 'classes/class-base-tracker.php';
require_once plugin_dir_path(__FILE__) . 'classes/class-content-buffer.php';
}
if($method == 'attachment_url_hook'){
require_once plugin_dir_path(__FILE__) . 'classes/class-base-tracker.php';
require_once plugin_dir_path(__FILE__) . 'classes/class-attachment-url-hook.php';
}