PluginProbe
Tracking Code Manager / 2.3.0
Tracking Code Manager v2.3.0
2.8.0 2.7.0 trunk 1.11.8 1.11.9 1.12.0 1.12.1 1.12.2 1.12.3 1.4 1.5 2.0.0 2.0.1 2.0.13 2.0.14 2.0.15 2.0.16 2.0.2 2.0.3 2.0.4 2.0.5 2.0.6 2.0.7 2.1.0 2.2.0 All 29 releases
← All changes | index.php +100 -96 2.0.02.3.0 View file →
@@ -2,122 +2,126 @@
2 2 /*
3 3 Plugin Name: Tracking Code Manager
4 4 Plugin URI: http://intellywp.com/tracking-code-manager/
5 5 Description: A plugin to manage ALL your tracking code and conversion pixels, simply. Compatible with Facebook Ads, Google Adwords, WooCommerce, Easy Digital Downloads, WP eCommerce.
6 -Author: IntellyWP
7 -Author URI: http://intellywp.com/
8 -Email: info@intellywp.com
9 -Version: 2.0.0
10 -WC requires at least: 3.0.0
11 -WC tested up to: 4
6 +Author: Data443
7 +Author URI: https://data443.com/
8 +Email: support@data443.com
9 +Version: 2.3.0
10 +Requires at least: 3.6.0
11 +Requires PHP: 5.6
12 12 */
13 -if(defined('TCMP_PLUGIN_NAME')) {
14 - function tcmp_admin_notices() {
15 - global $tcmp; ?>
16 - <div style="clear:both"></div>
17 - <div class="error iwp" style="padding:10px;">
18 - <?php $tcmp->Lang->P('PluginProAlreadyInstalled'); ?>
19 - </div>
20 - <div style="clear:both"></div>
21 - <?php }
22 - add_action('admin_notices', 'tcmp_admin_notices');
23 - return;
13 +register_activation_hook(__FILE__, function () {
14 + if (in_array('tracking-code-manager-pro/index.php', apply_filters('active_plugins', get_option('active_plugins')))) {
15 + die;
16 + }
17 +});
18 +if (defined('TCMP_PLUGIN_NAME')) {
19 + die('This plugin could not be activated because the PRO version of this plugin is active. Deactivate the PRO version before activating this one. No data will be lost.');
24 20 }
25 -define('TCMP_PLUGIN_PREFIX', 'TCMP_');
26 -define('TCMP_PLUGIN_FILE',__FILE__);
27 -define('TCMP_PLUGIN_SLUG', 'tracking-code-manager');
28 -define('TCMP_PLUGIN_NAME', 'Tracking Code Manager');
29 -define('TCMP_PLUGIN_VERSION', '2.0.0');
30 -define('TCMP_PLUGIN_AUTHOR', 'IntellyWP');
31 21
32 -define('TCMP_PLUGIN_DIR', dirname(__FILE__).'/');
33 -define('TCMP_PLUGIN_ASSETS_URI', plugins_url( 'assets/', __FILE__ ));
34 -define('TCMP_PLUGIN_IMAGES_URI', plugins_url( 'assets/images/', __FILE__ ));
22 +define( 'TCMP_PLUGIN_PREFIX', 'TCMP_' );
23 +define( 'TCMP_PLUGIN_FILE', __FILE__ );
24 +define( 'TCMP_PLUGIN_SLUG', 'tracking-code-manager' );
25 +define( 'TCMP_PLUGIN_NAME', 'Tracking Code Manager' );
26 +define( 'TCMP_PLUGIN_VERSION', '2.3.0' );
27 +define( 'TCMP_PLUGIN_AUTHOR', 'IntellyWP' );
35 28
36 -define('TCMP_LOGGER', FALSE);
37 -define('TCMP_AUTOSAVE_LANG', FALSE);
29 +define( 'TCMP_PLUGIN_DIR', dirname( __FILE__ ) . '/' );
30 +define( 'TCMP_PLUGIN_ASSETS_URI', plugins_url( 'assets/', __FILE__ ) );
31 +define( 'TCMP_PLUGIN_IMAGES_URI', plugins_url( 'assets/images/', __FILE__ ) );
32 +define( 'TCMP_PLUGIN_ACE', plugins_url( 'assets/js/ace/ace.js', __FILE__ ) );
38 33
39 -define('TCMP_QUERY_POSTS_OF_TYPE', 1);
40 -define('TCMP_QUERY_POST_TYPES', 2);
41 -define('TCMP_QUERY_CATEGORIES', 3);
42 -define('TCMP_QUERY_TAGS', 4);
43 -define('TCMP_QUERY_CONVERSION_PLUGINS', 5);
44 -define('TCMP_QUERY_TAXONOMY_TYPES', 6);
45 -define('TCMP_QUERY_TAXONOMIES_OF_TYPE', 7);
34 +define( 'TCMP_LOGGER', false );
35 +define( 'TCMP_AUTOSAVE_LANG', false );
46 36
47 -define('TCMP_INTELLYWP_SITE', 'http://www.intellywp.com/');
48 -define('TCMP_INTELLYWP_ENDPOINT', TCMP_INTELLYWP_SITE.'wp-content/plugins/intellywp-manager/data.php');
49 -define('TCMP_PAGE_FAQ', TCMP_INTELLYWP_SITE.'tracking-code-manager');
50 -define('TCMP_PAGE_PREMIUM', TCMP_INTELLYWP_SITE.'tracking-code-manager');
51 -define('TCMP_PAGE_MANAGER', admin_url().'options-general.php?page='.TCMP_PLUGIN_SLUG);
52 -define('TCMP_PLUGIN_URI', plugins_url('/', __FILE__ ));
37 +define( 'TCMP_QUERY_POSTS_OF_TYPE', 1 );
38 +define( 'TCMP_QUERY_POST_TYPES', 2 );
39 +define( 'TCMP_QUERY_CATEGORIES', 3 );
40 +define( 'TCMP_QUERY_TAGS', 4 );
41 +define( 'TCMP_QUERY_CONVERSION_PLUGINS', 5 );
42 +define( 'TCMP_QUERY_TAXONOMY_TYPES', 6 );
43 +define( 'TCMP_QUERY_TAXONOMIES_OF_TYPE', 7 );
53 44
54 -define('TCMP_POSITION_HEAD', 0);
55 -define('TCMP_POSITION_BODY', 1);
56 -define('TCMP_POSITION_FOOTER', 2);
57 -define('TCMP_POSITION_CONVERSION', 3);
45 +define( 'TCMP_INTELLYWP_ENDPOINT', 'http://www.intellywp.com/wp-content/plugins/intellywp-manager/data.php' );
46 +define( 'TCMP_PAGE_FAQ', 'http://www.intellywp.com/tracking-code-manager' );
47 +define( 'TCMP_PAGE_PREMIUM', 'http://www.intellywp.com/tracking-code-manager' );
48 +define( 'TCMP_PAGE_MANAGER', admin_url() . 'options-general.php?page=' . TCMP_PLUGIN_SLUG );
49 +define( 'TCMP_PLUGIN_URI', plugins_url( '/', __FILE__ ) );
58 50
59 -define('TCMP_TRACK_MODE_CODE', 0);
60 -define('TCMP_TRACK_PAGE_ALL', 0);
61 -define('TCMP_TRACK_PAGE_SPECIFIC', 1);
51 +define( 'TCMP_POSITION_HEAD', 0 );
52 +define( 'TCMP_POSITION_BODY', 1 );
53 +define( 'TCMP_POSITION_FOOTER', 2 );
54 +define( 'TCMP_POSITION_CONVERSION', 3 );
62 55
63 -define('TCMP_DEVICE_TYPE_MOBILE', 'mobile');
64 -define('TCMP_DEVICE_TYPE_TABLET', 'tablet');
65 -define('TCMP_DEVICE_TYPE_DESKTOP', 'desktop');
66 -define('TCMP_DEVICE_TYPE_ALL', 'all');
56 +define( 'TCMP_TRACK_MODE_CODE', 0 );
57 +define( 'TCMP_TRACK_PAGE_ALL', 0 );
58 +define( 'TCMP_TRACK_PAGE_SPECIFIC', 1 );
67 59
68 -define('TCMP_TAB_EDITOR', 'editor');
69 -define('TCMP_TAB_EDITOR_URI', TCMP_PAGE_MANAGER.'&tab='.TCMP_TAB_EDITOR);
70 -define('TCMP_TAB_MANAGER', 'manager');
71 -define('TCMP_TAB_MANAGER_URI', TCMP_PAGE_MANAGER.'&tab='.TCMP_TAB_MANAGER);
72 -define('TCMP_TAB_SETTINGS', 'settings');
73 -define('TCMP_TAB_SETTINGS_URI', TCMP_PAGE_MANAGER.'&tab='.TCMP_TAB_SETTINGS);
74 -define('TCMP_TAB_DOCS', 'docs');
75 -define('TCMP_TAB_DOCS_URI', 'http://intellywp.com/docs/category/tracking-code-manager/');
76 -define('TCMP_TAB_DOCS_DCV_URI', 'https://data443.atlassian.net/servicedesk/customer/kb/view/947486813');
77 -define('TCMP_TAB_ABOUT', 'about');
78 -define('TCMP_TAB_ABOUT_URI', TCMP_PAGE_MANAGER.'&tab='.TCMP_TAB_ABOUT);
79 -define('TCMP_TAB_WHATS_NEW', 'whatsnew');
80 -define('TCMP_TAB_WHATS_NEW_URI', TCMP_PAGE_MANAGER.'&tab='.TCMP_TAB_WHATS_NEW);
60 +define( 'TCMP_DEVICE_TYPE_MOBILE', 'mobile' );
61 +define( 'TCMP_DEVICE_TYPE_TABLET', 'tablet' );
62 +define( 'TCMP_DEVICE_TYPE_DESKTOP', 'desktop' );
63 +define( 'TCMP_DEVICE_TYPE_ALL', 'all' );
81 64
82 -define('TCMP_SNIPPETS_LIMIT', 6);
65 +define( 'TCMP_HOOK_PRIORITY_DEFAULT', 10 );
83 66
84 -include_once(dirname(__FILE__).'/autoload.php');
85 -tcmp_include_php(dirname(__FILE__).'/includes/');
67 +define( 'TCMP_TAB_EDITOR', 'editor' );
68 +define( 'TCMP_TAB_EDITOR_URI', TCMP_PAGE_MANAGER . '&tab=' . TCMP_TAB_EDITOR );
69 +define( 'TCMP_TAB_MANAGER', 'manager' );
70 +define( 'TCMP_TAB_MANAGER_URI', TCMP_PAGE_MANAGER . '&tab=' . TCMP_TAB_MANAGER );
71 +define( 'TCMP_TAB_ADMIN_OPTIONS', 'admin options' );
72 +define( 'TCMP_TAB_ADMIN_OPTIONS_URI', TCMP_PAGE_MANAGER . '&tab=' . TCMP_TAB_ADMIN_OPTIONS );
73 +define( 'TCMP_TAB_SETTINGS', 'settings' );
74 +define( 'TCMP_TAB_SETTINGS_URI', TCMP_PAGE_MANAGER . '&tab=' . TCMP_TAB_SETTINGS );
75 +define( 'TCMP_TAB_DOCS', 'docs' );
76 +define( 'TCMP_TAB_DOCS_URI', 'http://intellywp.com/docs/category/tracking-code-manager/' );
77 +define( 'TCMP_TAB_DOCS_DCV_URI', 'https://data443.atlassian.net/servicedesk/customer/kb/view/947486813' );
78 +define( 'TCMP_TAB_ABOUT', 'about' );
79 +define( 'TCMP_TAB_ABOUT_URI', TCMP_PAGE_MANAGER . '&tab=' . TCMP_TAB_ABOUT );
80 +define( 'TCMP_TAB_WHATS_NEW', 'whatsnew' );
81 +define( 'TCMP_TAB_WHATS_NEW_URI', TCMP_PAGE_MANAGER . '&tab=' . TCMP_TAB_WHATS_NEW );
86 82
83 +define( 'TCMP_SNIPPETS_LIMIT', 6 );
84 +
85 +include_once( dirname( __FILE__ ) . '/autoload.php' );
86 +tcmp_include_php( dirname( __FILE__ ) . '/includes/' );
87 +
87 88 global $tcmp;
88 -$tcmp=new TCMP_Singleton();
89 +$tcmp = new TCMP_Singleton();
89 90 $tcmp->init();
90 91
91 -function TCMP_QS($name, $default='') {
92 - global $tcmp;
93 - $result=$tcmp->Utils->qs($name, $default);
94 - return $result;
92 +include_once( dirname( __FILE__ ) . '/tcmp_free_wp_kses_tags_attrs.php' );
93 +
94 +tcmp_free_add_additional_tags_atts();
95 +
96 +function tcmp_qs( $name, $default = '' ) {
97 + global $tcmp;
98 + $result = $tcmp->utils->qs( $name, $default );
99 + return $result;
95 100 }
96 101 //SANITIZED METHODS
97 -function TCMP_SQS($name, $default='') {
98 - $result=TCMP_QS($name, $default);
99 - $result=sanitize_text_field($result);
100 - return $result;
102 +function tcmp_sqs( $name, $default = '' ) {
103 + $result = tcmp_qs( $name, $default );
104 + $result = sanitize_text_field( $result );
105 + return $result;
101 106 }
102 -function TCMP_ISQS($name, $default=0) {
103 - $result=TCMP_SQS($name, $default);
104 - $result=floatval($result);
105 - return $result;
107 +function tcmp_isqs( $name, $default = 0 ) {
108 + $result = tcmp_sqs( $name, $default );
109 + $result = floatval( $result );
110 + return $result;
106 111 }
107 -function TCMP_BSQS($name, $default=0) {
108 - global $tcmp;
109 - $result=$tcmp->Utils->bqs($name, $default);
110 - return $result;
112 +function tcmp_bsqs( $name, $default = 0 ) {
113 + global $tcmp;
114 + $result = $tcmp->utils->bqs( $name, $default );
115 + return $result;
111 116 }
112 -function TCMP_ASQS($name, $default=array()) {
113 - $result=TCMP_QS($name, $default);
114 - if(is_array($result)) {
115 - foreach ($result as $k=>$v) {
116 - $result[$k]=sanitize_text_field($v);
117 - }
118 - } else {
119 - $result=sanitize_text_field($result);
120 - }
121 - return $result;
117 +function tcmp_asqs( $name, $default = array() ) {
118 + $result = tcmp_qs( $name, $default );
119 + if ( is_array( $result ) ) {
120 + foreach ( $result as $k => $v ) {
121 + $result[ $k ] = sanitize_text_field( $v );
122 + }
123 + } else {
124 + $result = sanitize_text_field( $result );
125 + }
126 + return $result;
122 127 }
123 -