PluginProbe
Taboola Pixel / 1.0.22
Taboola Pixel v1.0.22
trunk 1.0.21 1.0.22 1.0.23 1.0.24 1.1.3 1.1.4 1.1.5 1.1.6 1.1.8
taboola-pixel / includes / common.php

common.php in Taboola Pixel 1.0.22, at includes/common.php

47 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 // Exit if accessed directly
4 if ( ! defined( 'ABSPATH' ) ) {
5 exit;
6 }
7
8 // Define integration type constants
9 define('TABPX_INTEGRATION_WP', 'WP');
10 define('TABPX_INTEGRATION_WOOCOMMERCE', 'WOOCOMMERCE_INTEGRATION');
11
12 // Define hostname constants
13 define('TABPX_THIRD_PARTY_CONNECT_HOST', 'https://ads.realizeperformance.com/');
14 define('TABPX_API_HOST', 'https://spfy-pxl.archive-digger.com/');
15
16 function tabpx_get_plugin_version()
17 {
18 if (!function_exists('get_plugin_data')) {
19 require_once(ABSPATH . 'wp-admin/includes/plugin.php');
20 }
21
22 $plugin_file = plugin_dir_path(__DIR__) . 'taboola-pixel.php';
23 $plugin_data = get_plugin_data($plugin_file);
24
25 return $plugin_data['Version'];
26 }
27
28 function tabpx_get_account_id()
29 {
30 $options = get_option('taboola_pixel_settings');
31 return isset($options['account_id']) ? trim(esc_js($options['account_id'])) : '';
32 }
33
34 function tabpx_is_woocommerce_active()
35 {
36 // Woocommerce integration is not active in this version
37 return false;
38 }
39
40 function tabpx_get_integration_type()
41 {
42 // Check if WooCommerce is active
43 if (tabpx_is_woocommerce_active()) {
44 return TABPX_INTEGRATION_WOOCOMMERCE;
45 }
46 return TABPX_INTEGRATION_WP;
47 }