PluginProbe
Wp Tracking Codes / trunk
Wp Tracking Codes vtrunk
trunk 1.0 1.0.1 1.0.2 1.0.3 1.0.4 1.1.0 1.1.0, 1.10.0 1.2.0 1.3.0 1.3.1 1.3.2 1.3.3 1.4.0 1.4.1 1.5.0 1.6.0 1.7.0 1.8.0 1.9.0 1.9.1 1.9.2 1.9.3
← All changes | wp-tracking-codes.php +10 -29 1.9.2trunk View file →
@@ -1,15 +1,15 @@
1 1 <?php
2 2 /**
3 3 * Plugin Name: Wp Tracking Codes
4 - * Plugin URI: https://br.wordpress.org/plugins/wp-tracking-codes/
4 + * Plugin URI: https://wordpress.org/plugins/wp-tracking-codes/
5 5 * Description: The tracking codes in one place. Support: GTM, GA4 Global Tag, ADS Remarketing Global Tag, Google Merchant Customer Reviews for WooCommerce, Facebook.
6 - * Version: 1.9.2
6 + * Version: 1.10.0
7 7 * Requires at least: 5.2.0
8 - * Tested up to: 6.4.3
9 - * Requires PHP: 7.2
10 - * Author: Array.codes
11 - * Author URI: https://array.codes
8 + * Tested up to: 7.0
9 + * Requires PHP: 7.4
10 + * Author: Array.codes
11 + * Author URI: https://array.codes
12 12 * Developer: Heitor Sousa
13 13 * Developer URI: https://array.codes/
14 14 * Domain Path: /languages
15 15 * Text Domain: wp-tracking-codes
@@ -14,9 +14,9 @@
14 14 * Domain Path: /languages
15 15 * Text Domain: wp-tracking-codes
16 16 *
17 17 * WC requires at least: 4.8.0
18 - * WC tested up to: 8.7.0
18 + * WC tested up to: 10.9.0
19 19 *
20 20 * License: GPLv2 or later
21 21 * License URI: http://www.gnu.org/licenses/gpl-2.0.html
22 22 *
@@ -31,9 +31,9 @@
31 31 * Plugin version.
32 32 *
33 33 * @var string
34 34 */
35 - const VERSION = '1.9.2';
35 + const VERSION = '1.10.0';
36 36 /**
37 37 * Instance of this class.
38 38 *
39 39 * @var object
@@ -62,9 +62,8 @@
62 62 //Load Tracking Facebook ID
63 63 add_action( 'wp_head', array( $this, 'hook_facebook_pixel_code' ) );
64 64 //Load Tracking Google Tag Manager in Head and after Body
65 65 add_action('wp_head', array($this, 'hook_google_tag_manager_head'));
66 - add_filter('template_include', array( $this, 'custom_include' ),0 );
67 66 add_filter('wp_body_open', array( $this, 'hook_google_tag_manager_body' ),0);
68 67 add_action( 'before_woocommerce_init', array( $this, 'declare_compatibility_hpos') );
69 68 }
70 69 /**
@@ -110,23 +109,10 @@
110 109 * Includes
111 110 */
112 111 private function includes() {
113 112 include_once 'includes/class-register-codes.php';
114 - include_once 'includes/class-render-data-layer-gtm.php';
115 113 include_once 'includes/class-render-google-merchant.php';
116 114 }
117 - /**
118 - * Debug
119 - */
120 - public function log_me($message) {
121 - if (WP_DEBUG === true) {
122 - if (is_array($message) || is_object($message)) {
123 - error_log(print_r($message, true));
124 - } else {
125 - error_log($message);
126 - }
127 - }
128 - }
129 115
130 116 public function hook_analytics_4(){
131 117 $this->options = get_option( 'tracking_option' );
132 118 if( isset( $this->options['analytics_4'] ) && !empty( $this->options['analytics_4'] ) ){
@@ -176,21 +162,16 @@
176 162 n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;
177 163 t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,
178 164 document,'script','https://connect.facebook.net/en_US/fbevents.js');
179 165
180 - fbq('init', '%s');
166 + fbq('init', '%1\$s');
181 167 fbq('track', 'PageView');</script>
182 168 <noscript><img height='1' width='1' style='display:none'
183 - src='https://www.facebook.com/tr?id=1556124141356092&ev=PageView&noscript=1'
169 + src='https://www.facebook.com/tr?id=%1\$s&ev=PageView&noscript=1'
184 170 /></noscript>
185 171 <!-- End Facebook Pixel Code -->
186 172 ", esc_attr($facebook_pixel_code) );
187 173 }
188 - }
189 -
190 - public function custom_include($template) {
191 - ob_start();
192 - return $template;
193 174 }
194 175
195 176 public function hook_google_tag_manager_head(){
196 177 $this->options = get_option('tracking_option');