PluginProbe ʕ •ᴥ•ʔ
Tracking Code Manager / 2.0.13
Tracking Code Manager v2.0.13
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 2.3.0 2.4.0 2.5.0 2.6.0
tracking-code-manager / index.php
tracking-code-manager Last commit date
assets 3 years ago includes 3 years ago languages 3 years ago .gitattributes 3 years ago .gitignore 3 years ago autoload.php 3 years ago index.php 3 years ago readme.txt 3 years ago screenshot-1.png 11 years ago screenshot-2.png 11 years ago screenshot-3.png 11 years ago screenshot-4.png 11 years ago screenshot-5.png 11 years ago
index.php
225 lines
1 <?php
2 /*
3 Plugin Name: Tracking Code Manager
4 Plugin URI: http://intellywp.com/tracking-code-manager/
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: Data443
7 Author URI: https://data443.com/
8 Email: support@data443.com
9 Version: 2.0.13
10 Requires at least: 3.6.0
11 Requires PHP: 5.6
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 }
23 add_action( 'admin_notices', 'tcmp_admin_notices' );
24 return;
25 }
26 define( 'TCMP_PLUGIN_PREFIX', 'TCMP_' );
27 define( 'TCMP_PLUGIN_FILE', __FILE__ );
28 define( 'TCMP_PLUGIN_SLUG', 'tracking-code-manager' );
29 define( 'TCMP_PLUGIN_NAME', 'Tracking Code Manager' );
30 define( 'TCMP_PLUGIN_VERSION', '2.0.13' );
31 define( 'TCMP_PLUGIN_AUTHOR', 'IntellyWP' );
32
33 define( 'TCMP_PLUGIN_DIR', dirname( __FILE__ ) . '/' );
34 define( 'TCMP_PLUGIN_ASSETS_URI', plugins_url( 'assets/', __FILE__ ) );
35 define( 'TCMP_PLUGIN_IMAGES_URI', plugins_url( 'assets/images/', __FILE__ ) );
36 define( 'TCMP_PLUGIN_ACE', plugins_url( 'assets/js/ace/ace.js', __FILE__ ) );
37
38 define( 'TCMP_LOGGER', false );
39 define( 'TCMP_AUTOSAVE_LANG', false );
40
41 define( 'TCMP_QUERY_POSTS_OF_TYPE', 1 );
42 define( 'TCMP_QUERY_POST_TYPES', 2 );
43 define( 'TCMP_QUERY_CATEGORIES', 3 );
44 define( 'TCMP_QUERY_TAGS', 4 );
45 define( 'TCMP_QUERY_CONVERSION_PLUGINS', 5 );
46 define( 'TCMP_QUERY_TAXONOMY_TYPES', 6 );
47 define( 'TCMP_QUERY_TAXONOMIES_OF_TYPE', 7 );
48
49 define( 'TCMP_INTELLYWP_ENDPOINT', 'http://www.intellywp.com/wp-content/plugins/intellywp-manager/data.php' );
50 define( 'TCMP_PAGE_FAQ', 'http://www.intellywp.com/tracking-code-manager' );
51 define( 'TCMP_PAGE_PREMIUM', 'http://www.intellywp.com/tracking-code-manager' );
52 define( 'TCMP_PAGE_MANAGER', admin_url() . 'options-general.php?page=' . TCMP_PLUGIN_SLUG );
53 define( 'TCMP_PLUGIN_URI', plugins_url( '/', __FILE__ ) );
54
55 define( 'TCMP_POSITION_HEAD', 0 );
56 define( 'TCMP_POSITION_BODY', 1 );
57 define( 'TCMP_POSITION_FOOTER', 2 );
58 define( 'TCMP_POSITION_CONVERSION', 3 );
59
60 define( 'TCMP_TRACK_MODE_CODE', 0 );
61 define( 'TCMP_TRACK_PAGE_ALL', 0 );
62 define( 'TCMP_TRACK_PAGE_SPECIFIC', 1 );
63
64 define( 'TCMP_DEVICE_TYPE_MOBILE', 'mobile' );
65 define( 'TCMP_DEVICE_TYPE_TABLET', 'tablet' );
66 define( 'TCMP_DEVICE_TYPE_DESKTOP', 'desktop' );
67 define( 'TCMP_DEVICE_TYPE_ALL', 'all' );
68
69 define( 'TCMP_HOOK_PRIORITY_DEFAULT', 10 );
70
71 define( 'TCMP_TAB_EDITOR', 'editor' );
72 define( 'TCMP_TAB_EDITOR_URI', TCMP_PAGE_MANAGER . '&tab=' . TCMP_TAB_EDITOR );
73 define( 'TCMP_TAB_MANAGER', 'manager' );
74 define( 'TCMP_TAB_MANAGER_URI', TCMP_PAGE_MANAGER . '&tab=' . TCMP_TAB_MANAGER );
75 define( 'TCMP_TAB_ADMIN_OPTIONS', 'admin options' );
76 define( 'TCMP_TAB_ADMIN_OPTIONS_URI', TCMP_PAGE_MANAGER . '&tab=' . TCMP_TAB_ADMIN_OPTIONS );
77 define( 'TCMP_TAB_SETTINGS', 'settings' );
78 define( 'TCMP_TAB_SETTINGS_URI', TCMP_PAGE_MANAGER . '&tab=' . TCMP_TAB_SETTINGS );
79 define( 'TCMP_TAB_DOCS', 'docs' );
80 define( 'TCMP_TAB_DOCS_URI', 'http://intellywp.com/docs/category/tracking-code-manager/' );
81 define( 'TCMP_TAB_DOCS_DCV_URI', 'https://data443.atlassian.net/servicedesk/customer/kb/view/947486813' );
82 define( 'TCMP_TAB_ABOUT', 'about' );
83 define( 'TCMP_TAB_ABOUT_URI', TCMP_PAGE_MANAGER . '&tab=' . TCMP_TAB_ABOUT );
84 define( 'TCMP_TAB_WHATS_NEW', 'whatsnew' );
85 define( 'TCMP_TAB_WHATS_NEW_URI', TCMP_PAGE_MANAGER . '&tab=' . TCMP_TAB_WHATS_NEW );
86
87 define( 'TCMP_SNIPPETS_LIMIT', 6 );
88
89 include_once( dirname( __FILE__ ) . '/autoload.php' );
90 tcmp_include_php( dirname( __FILE__ ) . '/includes/' );
91
92 global $tcmp_allowed_html_tags;
93 $tcmp_allowed_atts = array(
94 'align' => array(),
95 'class' => array(),
96 'type' => array(),
97 'id' => array(),
98 'dir' => array(),
99 'lang' => array(),
100 'style' => array(),
101 'xml:lang' => array(),
102 'src' => array(),
103 'alt' => array(),
104 'href' => array(),
105 'rel' => array(),
106 'rev' => array(),
107 'target' => array(),
108 'novalidate' => array(),
109 'type' => array(),
110 'value' => array(),
111 'name' => array(),
112 'tabindex' => array(),
113 'action' => array(),
114 'method' => array(),
115 'for' => array(),
116 'width' => array(),
117 'height' => array(),
118 'data' => array(),
119 'title' => array(),
120 'async' => array(),
121 'loading' => array(),
122 'referrerpolicy' => array(),
123 'sandbox' => array(),
124 'crossorigin' => array(),
125 'defer' => array(),
126 'integrity' => array(),
127 'nomodule' => array(),
128 'onload' => array(),
129 );
130 $tcmp_allowed_html_tags['form'] = $tcmp_allowed_atts;
131 $tcmp_allowed_html_tags['label'] = $tcmp_allowed_atts;
132 $tcmp_allowed_html_tags['input'] = $tcmp_allowed_atts;
133 $tcmp_allowed_html_tags['textarea'] = $tcmp_allowed_atts;
134 $tcmp_allowed_html_tags['iframe'] = $tcmp_allowed_atts;
135 $tcmp_allowed_html_tags['script'] = $tcmp_allowed_atts;
136 $tcmp_allowed_html_tags['noscript'] = $tcmp_allowed_atts;
137 $tcmp_allowed_html_tags['style'] = $tcmp_allowed_atts;
138 $tcmp_allowed_html_tags['strong'] = $tcmp_allowed_atts;
139 $tcmp_allowed_html_tags['small'] = $tcmp_allowed_atts;
140 $tcmp_allowed_html_tags['table'] = $tcmp_allowed_atts;
141 $tcmp_allowed_html_tags['span'] = $tcmp_allowed_atts;
142 $tcmp_allowed_html_tags['abbr'] = $tcmp_allowed_atts;
143 $tcmp_allowed_html_tags['code'] = $tcmp_allowed_atts;
144 $tcmp_allowed_html_tags['pre'] = $tcmp_allowed_atts;
145 $tcmp_allowed_html_tags['div'] = $tcmp_allowed_atts;
146 $tcmp_allowed_html_tags['img'] = $tcmp_allowed_atts;
147 $tcmp_allowed_html_tags['h1'] = $tcmp_allowed_atts;
148 $tcmp_allowed_html_tags['h2'] = $tcmp_allowed_atts;
149 $tcmp_allowed_html_tags['h3'] = $tcmp_allowed_atts;
150 $tcmp_allowed_html_tags['h4'] = $tcmp_allowed_atts;
151 $tcmp_allowed_html_tags['h5'] = $tcmp_allowed_atts;
152 $tcmp_allowed_html_tags['h6'] = $tcmp_allowed_atts;
153 $tcmp_allowed_html_tags['ol'] = $tcmp_allowed_atts;
154 $tcmp_allowed_html_tags['ul'] = $tcmp_allowed_atts;
155 $tcmp_allowed_html_tags['li'] = $tcmp_allowed_atts;
156 $tcmp_allowed_html_tags['em'] = $tcmp_allowed_atts;
157 $tcmp_allowed_html_tags['hr'] = $tcmp_allowed_atts;
158 $tcmp_allowed_html_tags['br'] = $tcmp_allowed_atts;
159 $tcmp_allowed_html_tags['tr'] = $tcmp_allowed_atts;
160 $tcmp_allowed_html_tags['td'] = $tcmp_allowed_atts;
161 $tcmp_allowed_html_tags['p'] = $tcmp_allowed_atts;
162 $tcmp_allowed_html_tags['a'] = $tcmp_allowed_atts;
163 $tcmp_allowed_html_tags['b'] = $tcmp_allowed_atts;
164 $tcmp_allowed_html_tags['i'] = $tcmp_allowed_atts;
165 $tcmp_allowed_html_tags['body'] = $tcmp_allowed_atts;
166
167 global $tcmp;
168 $tcmp = new TCMP_Singleton();
169 $tcmp->init();
170
171 function tcmp_add_additional_tags_atts() {
172 global $tcmp;
173 global $tcmp_allowed_html_tags;
174 global $tcmp_allowed_atts;
175 $tags = explode( ",", sanitize_text_field( $tcmp->options->getAdditionalRecognizedTags() ) );
176 $attrs = explode( ",", sanitize_text_field( $tcmp->options->getAdditionalRecognizedAttributes() ) );
177
178 foreach ( $tags as $tag ) {
179 $tag = trim( $tag );
180 $current_attrs = $tcmp_allowed_html_tags[$tag];
181 foreach ( $attrs as $k ) {
182 $k = trim( $k );
183 if ( !isset( $current_attrs[$k]) ) {
184 $current_attrs[$k] = array();
185 }
186 }
187 $tcmp_allowed_html_tags[$tag] = $current_attrs;
188 }
189 }
190
191 tcmp_add_additional_tags_atts();
192
193 function tcmp_qs( $name, $default = '' ) {
194 global $tcmp;
195 $result = $tcmp->utils->qs( $name, $default );
196 return $result;
197 }
198 //SANITIZED METHODS
199 function tcmp_sqs( $name, $default = '' ) {
200 $result = tcmp_qs( $name, $default );
201 $result = sanitize_text_field( $result );
202 return $result;
203 }
204 function tcmp_isqs( $name, $default = 0 ) {
205 $result = tcmp_sqs( $name, $default );
206 $result = floatval( $result );
207 return $result;
208 }
209 function tcmp_bsqs( $name, $default = 0 ) {
210 global $tcmp;
211 $result = $tcmp->utils->bqs( $name, $default );
212 return $result;
213 }
214 function tcmp_asqs( $name, $default = array() ) {
215 $result = tcmp_qs( $name, $default );
216 if ( is_array( $result ) ) {
217 foreach ( $result as $k => $v ) {
218 $result[ $k ] = sanitize_text_field( $v );
219 }
220 } else {
221 $result = sanitize_text_field( $result );
222 }
223 return $result;
224 }
225