PluginProbe
CookieAdmin – Cookie Consent Banner / 1.2.3
CookieAdmin – Cookie Consent Banner v1.2.3
1.2.3 1.2.2 1.2.1 1.2.0 1.1.9 trunk 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8
← All changes | includes/functions.php +52 -27 1.2.01.2.3 View file →
@@ -69,9 +69,13 @@
69 69
70 70 add_action('wp_enqueue_scripts', '\CookieAdmin\Enduser::enqueue_scripts');
71 71
72 72 // Insert Cookie blocker in the head.
73 - //add_action('send_headers', '\CookieAdmin\Enduser::cookieadmin_block_cookie_init_php', 100);
73 + add_action('send_headers', '\CookieAdmin\Enduser::cookieadmin_block_cookie_init_php', 100);
74 + add_filter( 'rest_pre_serve_request', function ( $served ) {
75 + \CookieAdmin\Enduser::cookieadmin_block_cookie_init_php();
76 + return $served;
77 + }, 999 );
74 78 // add_action('init', '\CookieAdmin\Enduser::cookieadmin_block_cookie_head_js', 0);
75 79
76 80 //add Cookie Banner to user page
77 81 if(!cookieadmin_is_editor_mode()){
@@ -118,8 +122,18 @@
118 122 if (isset($_GET['pagelayer-live']) || isset($_GET['fl_builder'])) {
119 123 return true;
120 124 }
121 125
126 + // Avada builder
127 + if(isset($_GET['fb-edit']) || isset($_GET['builder']) || isset($_GET['builder_id'])){
128 + return true;
129 + }
130 +
131 + // Bricks Builder
132 + if(isset($_GET['bricks']) || isset($_GET['brickspreview'])){
133 + return true;
134 + }
135 +
122 136 if(isset($_GET['vc_action']) && $_GET['vc_action'] == 'vc_inline'){
123 137 return true;
124 138 }
125 139
@@ -126,8 +140,12 @@
126 140 if(isset($_GET['elementor-preview']) || (isset($_GET['action']) && $_GET['action'] == 'elementor')){
127 141 return true;
128 142 }
129 143
144 + if(isset($_GET['et_fb']) && ($_GET['et_fb'] == 1)){
145 + return true;
146 + }
147 +
130 148 return false;
131 149
132 150 }
133 151
@@ -217,33 +235,37 @@
217 235 $cookieadmin_powered_by_html = apply_filters('cookieadmin_powered_by_html', $cookieadmin_powered_by_html);
218 236 $privacy_policy_links = apply_filters('cookieadmin_privacy_policy_links', array(), $policy);
219 237 $reconsent_icon_url = apply_filters('cookieadmin_reconsent_icon_url', '', $policy);
220 238
221 - return [
222 - 'override_gpc' => apply_filters('cookieadmin_override_gpc_html', ''),
223 - 'powered_by_html' => $cookieadmin_powered_by_html,
224 - 'banner_policy_links' => !empty($privacy_policy_links['banner']) ? $privacy_policy_links['banner'] : '',
225 - 'modal_policy_links' => !empty($privacy_policy_links['modal']) ? $privacy_policy_links['modal'] : '',
226 - 'reconsent_icon_url' => esc_url($reconsent_icon_url),
227 - 'logo_svg' => cookieadmin_logo_svg(),
228 - 'plugin_url' => esc_url(COOKIEADMIN_PLUGIN_URL),
229 - 'powered_by' => __('Powered by', 'cookieadmin'),
230 - 'reconsent' => __('Re-consent', 'cookieadmin'),
231 - 'cookie_preferences' => __('Cookie Preferences', 'cookieadmin'),
232 - 'remark_standard' => __('Always Active', 'cookieadmin'),
233 - 'remark' => __('Remark', 'cookieadmin'),
234 - 'none' => __('None', 'cookieadmin'),
235 - 'necessary_cookies' => __('Necessary Cookies', 'cookieadmin'),
236 - 'necessary_cookies_desc' => __('Necessary cookies enable essential site features like secure log-ins and consent preference adjustments. They do not store personal data.', 'cookieadmin'),
237 - 'functional_cookies' => __('Functional Cookies', 'cookieadmin'),
238 - 'functional_cookies_desc' => __('Functional cookies support features like content sharing on social media, collecting feedback, and enabling third-party tools.', 'cookieadmin'),
239 - 'analytical_cookies' => __('Analytical Cookies', 'cookieadmin'),
240 - 'analytical_cookies_desc' => __('Analytical cookies track visitor interactions, providing insights on metrics like visitor count, bounce rate, and traffic sources.', 'cookieadmin'),
241 - 'advertisement_cookies' => __('Advertisement Cookies', 'cookieadmin'),
242 - 'advertisement_cookies_desc' => __('Advertisement cookies deliver personalized ads based on your previous visits and analyze the effectiveness of ad campaigns.', 'cookieadmin'),
243 - 'unclassified_cookies' => __('Unclassified Cookies', 'cookieadmin'),
244 - 'unclassified_cookies_desc' => __('Unclassified cookies are cookies that we are in the process of classifying, together with the providers of individual cookies.', 'cookieadmin'),
245 - ];
239 + $strings = [
240 + 'override_gpc' => apply_filters('cookieadmin_override_gpc_html', ''),
241 + 'powered_by_html' => $cookieadmin_powered_by_html,
242 + 'banner_policy_links' => !empty($privacy_policy_links['banner']) ? $privacy_policy_links['banner'] : '',
243 + 'modal_policy_links' => !empty($privacy_policy_links['modal']) ? $privacy_policy_links['modal'] : '',
244 + 'reconsent_icon_url' => esc_url($reconsent_icon_url),
245 + 'logo_svg' => cookieadmin_logo_svg(),
246 + 'plugin_url' => esc_url(COOKIEADMIN_PLUGIN_URL),
247 + 'powered_by' => __('Powered by', 'cookieadmin'),
248 + 'reconsent' => __('Re-consent', 'cookieadmin'),
249 + 'close' => __('Close', 'cookieadmin'),
250 + 'cookie_consent' => __('Cookie Consent', 'cookieadmin'),
251 + 'cookie_preferences' => __('Cookie Preferences', 'cookieadmin'),
252 + 'remark_standard' => __('Always Active', 'cookieadmin'),
253 + 'remark' => __('Remark', 'cookieadmin'),
254 + 'none' => __('None', 'cookieadmin'),
255 + 'necessary_cookies' => __('Necessary Cookies', 'cookieadmin'),
256 + 'necessary_cookies_desc' => __('Necessary cookies enable essential site features like secure log-ins and consent preference adjustments. They do not store personal data.', 'cookieadmin'),
257 + 'functional_cookies' => __('Functional Cookies', 'cookieadmin'),
258 + 'functional_cookies_desc' => __('Functional cookies support features like content sharing on social media, collecting feedback, and enabling third-party tools.', 'cookieadmin'),
259 + 'analytical_cookies' => __('Analytical Cookies', 'cookieadmin'),
260 + 'analytical_cookies_desc' => __('Analytical cookies track visitor interactions, providing insights on metrics like visitor count, bounce rate, and traffic sources.', 'cookieadmin'),
261 + 'advertisement_cookies' => __('Advertisement Cookies', 'cookieadmin'),
262 + 'advertisement_cookies_desc' => __('Advertisement cookies deliver personalized ads based on your previous visits and analyze the effectiveness of ad campaigns.', 'cookieadmin'),
263 + 'unclassified_cookies' => __('Unclassified Cookies', 'cookieadmin'),
264 + 'unclassified_cookies_desc' => __('Unclassified cookies are cookies that we are in the process of classifying, together with the providers of individual cookies.', 'cookieadmin'),
265 + ];
266 +
267 + return apply_filters('cookieadmin_default_strings', $strings);
246 268 }
247 269
248 270 //Loads consent data from file
249 271 function cookieadmin_load_consent_template($policy, $view){
@@ -282,9 +304,9 @@
282 304 $template[$view] = str_replace('[['.$ck.']]', $cv, $template[$view]);
283 305 }
284 306
285 307 $template[$view] = apply_filters('cookieadmin_consent_banner_template', $template[$view]);
286 -
308 +
287 309 return $template;
288 310
289 311 }
290 312
@@ -471,8 +493,11 @@
471 493 'placeholder' => true,
472 494 );
473 495
474 496 $allowed_tags['defs'] = array();
497 +
498 + // aria-modal is not part of the wp_kses post-context globals
499 + $allowed_tags['div']['aria-modal'] = true;
475 500
476 501 $allowed_tags['a'] = array(
477 502 'href' => true,
478 503 'target' => true,