This repository has been archived by the owner on Oct 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtop-10-fast-tracker.php
93 lines (82 loc) · 2.15 KB
/
top-10-fast-tracker.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<?php
/**
* Top 10 - Fast Tracker.
*
* Addon for Top 10 WordPress plugin to use a high speed tracker.
*
* @package Top_Ten_Fast_Tracker
* @author Ajay D'Souza <me@ajaydsouza.com>
* @license GPL-2.0+
* @link https://webberzone.com
* @copyright 2016-2024 WebberZone
*
* @wordpress-plugin
* Plugin Name: Top 10 - Fast Tracker
* Plugin URI: https://github.com/WebberZone/top-10-fast-tracker/
* Description: Addon for Top 10 WordPress plugin to use a high speed tracker
* Version: 1.1.0
* Author: WebberZone
* Author URI: https://webberzone.com
* License: GPL-2.0+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* Text Domain: top-10-fast-tracker
* Domain Path: /languages
* GitHub Plugin URI: https://github.com/WebberZone/top-10-fast-tracker/
*/
// If this file is called directly, abort.
if ( ! defined( 'WPINC' ) ) {
die;
}
/**
* Holds the filesystem directory path (with trailing slash) for Top 10
*
* @since 1.0.0
*
* @var string Plugin folder path
*/
if ( ! defined( 'TPTN_FT_PLUGIN_DIR' ) ) {
define( 'TPTN_FT_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
}
/**
* Holds the filesystem directory path (with trailing slash) for Top 10
*
* @since 1.0.0
*
* @var string Plugin folder URL
*/
if ( ! defined( 'TPTN_FT_PLUGIN_URL' ) ) {
define( 'TPTN_FT_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
}
/**
* Holds the location of this file
*
* @since 1.0.0
*
* @var string Plugin Root File
*/
if ( ! defined( 'TPTN_FT_PLUGIN_FILE' ) ) {
define( 'TPTN_FT_PLUGIN_FILE', __FILE__ );
}
/**
* Use external tracker.
*
* @since 1.0.0
*
* @param string $home_url URL of Top script.
* @return string
*/
function tptnft_tracker( $home_url ) {
global $tptn_settings;
if ( 'fast_tracker' === $tptn_settings['tracker_type'] ) {
return TPTN_FT_PLUGIN_URL . 'includes/fast-tracker-js.php';
} else {
return $home_url;
}
}
add_filter( 'tptn_add_counter_script_url', 'tptnft_tracker' );
/*
----------------------------------------------------------------------------*
* Include files
*---------------------------------------------------------------------------*
*/
require_once TPTN_FT_PLUGIN_DIR . 'includes/hooks.php';