From 5705570fe40b9f31e671ded1fb13194a7e486b3d Mon Sep 17 00:00:00 2001 From: Gregory Pradun Date: Fri, 15 Apr 2022 18:35:45 +0300 Subject: [PATCH 1/2] LAW-5401 --- htdocs/wp-content/themes/lawcarta/functions.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/htdocs/wp-content/themes/lawcarta/functions.php b/htdocs/wp-content/themes/lawcarta/functions.php index ae2e59e..9f3a15c 100644 --- a/htdocs/wp-content/themes/lawcarta/functions.php +++ b/htdocs/wp-content/themes/lawcarta/functions.php @@ -353,8 +353,14 @@ add_filter( 'robots_txt', function( $output, $public ) { }, 99, 2 ); // Priority 99, Number of Arguments 2. function mark_redirected_user(){ +if (): ?> - if(isset($_GET['law']) && $_GET['law'] == 1){ + if( + isset($_GET['law']) + && $_GET['law'] == 1 + && isset($_COOKIE['cookie_level']) + && in_array($_COOKIE['cookie_level'], ['12', '123']) + ){ $cookieDomain = (LAWCARTA_ENVIRONMENT_NAME == 'local') ? 'livecarta.loc' : 'livecarta.com'; setcookie('law_'.LAWCARTA_ENVIRONMENT_NAME, 1,0,"/", $cookieDomain); } From bc7feddf090dec11aafce50d02d4bb721d94a128 Mon Sep 17 00:00:00 2001 From: Gregory Pradun Date: Mon, 18 Apr 2022 12:28:16 +0300 Subject: [PATCH 2/2] LAW-5401 --- htdocs/wp-content/themes/lawcarta/functions.php | 1 - 1 file changed, 1 deletion(-) diff --git a/htdocs/wp-content/themes/lawcarta/functions.php b/htdocs/wp-content/themes/lawcarta/functions.php index 9f3a15c..2b972d0 100644 --- a/htdocs/wp-content/themes/lawcarta/functions.php +++ b/htdocs/wp-content/themes/lawcarta/functions.php @@ -353,7 +353,6 @@ add_filter( 'robots_txt', function( $output, $public ) { }, 99, 2 ); // Priority 99, Number of Arguments 2. function mark_redirected_user(){ -if (): ?> if( isset($_GET['law'])