PluginProbe ʕ •ᴥ•ʔ
PixelYourSite – Your smart PIXEL (TAG) & API Manager / 9.5.5
PixelYourSite – Your smart PIXEL (TAG) & API Manager v9.5.5
11.2.0.6 trunk 1.0 1.01 1.02 1.03 1.04 1.05 1.05.1 10.0.0 10.0.1 10.0.1.1 10.0.1.2 10.0.2 10.0.3 10.0.3.1 10.0.4 10.1.0 10.1.1 10.1.1.1 10.1.1.2 10.1.2.1 10.1.3 10.2.0 10.2.0.1 10.2.0.2 10.2.1 11.0.0 11.0.0.1 11.0.0.2 11.0.0.3 11.0.0.4 11.0.1 11.0.1.1 11.0.1.2 11.0.2 11.1.0 11.1.1 11.1.2 11.1.3 11.1.4 11.1.4.1 11.1.4.2 11.1.5 11.1.5.1 11.1.5.2 11.2.0 11.2.0.1 11.2.0.2 11.2.0.3 11.2.0.4 11.2.0.5 2.0 2.1 2.2 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.7 2.8.10 2.8.9 3.0 3.0.1 3.0.2 3.0.3 3.1.0 4.0.0 4.0.1 4.0.2 4.0.3 5.0.0 5.0.1 5.0.2 5.0.3 5.0.4 5.0.5.2 5.0.6 5.0.7 5.0.8 5.0.9 5.1.0 5.2.0 5.2.1 5.3.0 5.3.1 5.3.2 5.3.3 5.3.4 7.0.0 7.0.1 7.0.2 7.0.3 7.0.4 7.0.5 7.1.0 7.1.1 7.1.10 7.1.11 7.1.12 7.1.13 7.1.14 7.1.2 7.1.3 7.1.4 7.1.5 7.1.6 7.1.7 7.1.8 7.1.9 7.2.0 7.2.1 7.2.1.1 7.3.0 8.0.0 8.0.1 8.0.2 8.0.3 8.0.4 8.0.5 8.0.6 8.0.7 8.0.8 8.0.9 8.1.0 8.1.1 8.2.0 8.2.1 8.2.10 8.2.11 8.2.12 8.2.13 8.2.14 8.2.15 8.2.16 8.2.17 8.2.18 8.2.2 8.2.3 8.2.4 8.2.5 8.2.6 8.2.7 8.2.8 9.0.0 9.1.0 9.1.1 9.2.0 9.2.1 9.2.2 9.3.0 9.3.1 9.3.2 9.3.3 9.3.4 9.3.5 9.3.6 9.3.7 9.3.8 9.3.8.1 9.3.9 9.4.0 9.4.0.1 9.4.1 9.4.2 9.4.3 9.4.5 9.4.5.1 9.4.6 9.4.7 9.4.7.1 9.5.0 9.5.0.1 9.5.1 9.5.1.1 9.5.3 9.5.4 9.5.5 9.6.0 9.6.0.1 9.6.1 9.6.1.1 9.6.2 9.7.0 9.7.0.1 9.7.1 9.7.2
pixelyoursite / includes / functions-gdpr.php
pixelyoursite / includes Last commit date
enrich 2 years ago events 2 years ago formEvents 2 years ago logger 2 years ago views 2 years ago class-custom-event-factory.php 7 years ago class-custom-event.php 2 years ago class-event-id-generator.php 5 years ago class-events-manager-ajax_hook.php 2 years ago class-events-manager.php 2 years ago class-fixed-notices.php 2 years ago class-pixel.php 7 years ago class-plugin-updater.php 2 years ago class-plugin.php 7 years ago class-pys.php 2 years ago class-settings.php 2 years ago functions-admin.php 2 years ago functions-common.php 2 years ago functions-custom-event.php 2 years ago functions-edd.php 2 years ago functions-gdpr.php 2 years ago functions-license.php 2 years ago functions-migrate.php 2 years ago functions-optin.php 2 years ago functions-promo-notices.php 3 years ago functions-system-report.php 7 years ago functions-update-plugin.php 6 years ago functions-woo.php 2 years ago options_defaults.json 2 years ago options_fields.json 2 years ago
functions-gdpr.php
165 lines
1 <?php
2
3 namespace PixelYourSite;
4
5 if ( ! defined( 'ABSPATH' ) ) {
6 exit; // Exit if accessed directly.
7 }
8
9 /**
10 * ConsentMagic
11 */
12 function isConsentMagicPluginActivated() {
13
14 if ( ! function_exists( 'is_plugin_active' ) ) {
15 include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
16 }
17
18 return (is_plugin_active( 'consent-magic-pro/consent-magic-pro.php' ) || is_plugin_active( 'consent-magic/consent-magic.php' )) ;
19 }
20 function isConsentMagicPluginInstalled() {
21
22 if ( ! function_exists( 'is_plugin_active' ) ) {
23 include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
24 }
25 $installed_plugins = get_plugins();
26 $plugin_slug = 'consent-magic/consent-magic.php';
27 $plugin_slug_pro = "consent-magic-pro/consent-magic-pro.php";
28
29 return
30 array_key_exists( $plugin_slug, $installed_plugins ) ||
31 in_array( $plugin_slug, $installed_plugins, true ) ||
32 array_key_exists( $plugin_slug_pro, $installed_plugins ) ||
33 in_array( $plugin_slug_pro, $installed_plugins, true );
34
35 }
36
37 function isConsentMagicPluginLicenceActivated() {
38 $id = get_option('cs_product_id');
39 if($id && get_option('wc_am_client_'.$id.'_activated') == 'Activated' || is_plugin_active( 'consent-magic/consent-magic.php')) {
40 return true;
41 }
42 return false;
43 }
44 /**
45 * @link https://wordpress.org/plugins/ginger/
46 */
47 function isGingerPluginActivated() {
48
49 if ( ! function_exists( 'is_plugin_active' ) ) {
50 include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
51 }
52
53 return is_plugin_active( 'ginger/ginger-eu-cookie-law.php' );
54
55 }
56
57 /**
58 * @link https://wordpress.org/plugins/cookiebot/
59 * @link https://www.cookiebot.com/en/developer/
60 */
61 function isCookiebotPluginActivated() {
62
63 if ( ! function_exists( 'is_plugin_active' ) ) {
64 include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
65 }
66
67 return is_plugin_active( 'cookiebot/cookiebot.php' );
68
69 }
70
71 /**
72 * @link https://wordpress.org/plugins/cookie-notice/
73 */
74 function isCookieNoticePluginActivated() {
75
76 if ( ! function_exists( 'is_plugin_active' ) ) {
77 include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
78 }
79
80 return is_plugin_active( 'cookie-notice/cookie-notice.php' );
81
82 }
83
84 /**
85 * GDPR Cookie Consent
86 *
87 * @link https://wordpress.org/plugins/cookie-law-info/
88 */
89 function isCookieLawInfoPluginActivated() {
90
91 if ( ! function_exists( 'is_plugin_active' ) ) {
92 include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
93 }
94
95 return is_plugin_active( 'cookie-law-info/cookie-law-info.php' )
96 || is_plugin_active( 'webtoffee-gdpr-cookie-consent/cookie-law-info.php' ) ;
97
98 }
99
100 /**
101 * GDPR Real Cookie Banner
102 *
103 * @link https://wordpress.org/plugins/real-cookie-banner/
104 */
105 function isRealCookieBannerPluginActivated() {
106
107 if ( ! function_exists( 'is_plugin_active' ) ) {
108 include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
109 }
110
111 return is_plugin_active( 'real-cookie-banner-pro/index.php' )
112 || is_plugin_active( 'real-cookie-banner/index.php' ) ;
113
114 }
115
116 function adminGdprAjaxNotEnabledNotice() {
117 $user_id = get_current_user_id();
118 $url = buildAdminUrl( 'pixelyoursite', 'gdpr', false, array(
119 '_wpnonce' => wp_create_nonce( 'pys_enable_gdpr_ajax' ),
120 'pys' => array(
121 'enable_gdpr_ajax' => true,
122 ),
123 ) );
124
125 $meta_key = 'pys_core_gdpr_ajax_notice_dismissed_at';
126 $dismissed_at = get_user_meta( $user_id, $meta_key );
127 if(!$dismissed_at){
128 ?>
129
130 <div class="notice notice-error is-dismissible pys_core_gdpr_ajax_notice">
131 <p>You use the <strong>GDPR Cookie Consent</strong> and <strong>PixelYourSite</strong> plugins. You
132 must turn on "Enable AJAX filter values update" option to avoid problems with cache plugins.
133 <a href="<?php echo esc_url( $url ); ?>"><strong>CLICK HERE TO
134 ENABLE</strong></a>.</p>
135 </div>
136
137 <script type="application/javascript">
138 jQuery(document).on('click', '.pys_core_gdpr_ajax_notice .notice-dismiss', function () {
139
140 jQuery.ajax({
141 url: ajaxurl,
142 data: {
143 action: 'pys_notice_dismiss',
144 nonce: '<?php esc_attr_e( wp_create_nonce( 'pys_notice_dismiss' ) ); ?>',
145 user_id: '<?php esc_attr_e( $user_id ); ?>',
146 addon_slug: 'core',
147 meta_key: 'gdpr_ajax_notice'
148 }
149 })
150
151 })
152 </script>
153 <?php
154 }
155 }
156
157 function adminGdprAjaxEnabledNotice() {
158 ?>
159
160 <div class="notice notice-success">
161 <p>All good :)</p>
162 </div>
163
164 <?php
165 }