diff --git a/environments/demo/wp-config-local.php b/environments/demo/wp-config-local.php index 03e31e9..248d10e 100644 --- a/environments/demo/wp-config-local.php +++ b/environments/demo/wp-config-local.php @@ -15,4 +15,6 @@ define('LAWCARTA_WP_REST_API_RESPONSE_URL', 'https://app-demo.lawcarta.com/v1/ev define('LAWCARTA_ENVIRONMENT_NAME', 'demo'); +define('LC_ALLOW_COOKIE_POPUP', true); + $_SERVER['HTTPS'] = 'On'; diff --git a/environments/dev/wp-config-local.php b/environments/dev/wp-config-local.php index 353fc61..b32d890 100644 --- a/environments/dev/wp-config-local.php +++ b/environments/dev/wp-config-local.php @@ -15,4 +15,6 @@ define('LAWCARTA_WP_REST_API_RESPONSE_URL', 'https://app-dev.lawcarta.com/v1/eve define('LAWCARTA_ENVIRONMENT_NAME', 'dev'); +define('LC_ALLOW_COOKIE_POPUP', true); + $_SERVER['HTTPS'] = 'On'; diff --git a/environments/local/wp-config-local.php b/environments/local/wp-config-local.php index 667cd6a..c47b4cf 100644 --- a/environments/local/wp-config-local.php +++ b/environments/local/wp-config-local.php @@ -11,6 +11,7 @@ define('LAWCARTA_SUBDOMAIN', 'app'); define('LAWCARTA_PORT', ''); define('LAWCARTA_ENVIRONMENT_NAME', 'local'); +define('LC_ALLOW_COOKIE_POPUP', true); $_SERVER['HTTPS'] = 'On'; diff --git a/environments/prod/wp-config-local.php b/environments/prod/wp-config-local.php index 68acd93..bd770f1 100644 --- a/environments/prod/wp-config-local.php +++ b/environments/prod/wp-config-local.php @@ -12,6 +12,8 @@ define('LAWCARTA_PORT', ''); define('LAWCARTA_ENVIRONMENT_NAME', 'prod'); +define('LC_ALLOW_COOKIE_POPUP', true); + define('LAWCARTA_GA_CONFIG', 'UA-111488943-1'); define('LIVECARTA_GA_CONFIG', 'UA-111488943-2'); diff --git a/environments/qa/wp-config-local.php b/environments/qa/wp-config-local.php index 5faffb5..eb170a1 100644 --- a/environments/qa/wp-config-local.php +++ b/environments/qa/wp-config-local.php @@ -12,6 +12,8 @@ define('LAWCARTA_PORT', ''); define('LAWCARTA_ENVIRONMENT_NAME', 'qa'); +define('LC_ALLOW_COOKIE_POPUP', true); + $_SERVER['HTTPS'] = 'On'; //S3 uploads settings diff --git a/htdocs/wp-content/themes/lawcarta/functions.php b/htdocs/wp-content/themes/lawcarta/functions.php index 2b972d0..28faae5 100644 --- a/htdocs/wp-content/themes/lawcarta/functions.php +++ b/htdocs/wp-content/themes/lawcarta/functions.php @@ -357,8 +357,7 @@ function mark_redirected_user(){ if( isset($_GET['law']) && $_GET['law'] == 1 - && isset($_COOKIE['cookie_level']) - && in_array($_COOKIE['cookie_level'], ['12', '123']) + && ((isset($_COOKIE['cookie_level']) && in_array($_COOKIE['cookie_level'], ['12', '123'])) || LC_ALLOW_COOKIE_POPUP == false) ){ $cookieDomain = (LAWCARTA_ENVIRONMENT_NAME == 'local') ? 'livecarta.loc' : 'livecarta.com'; setcookie('law_'.LAWCARTA_ENVIRONMENT_NAME, 1,0,"/", $cookieDomain); diff --git a/htdocs/wp-content/themes/lawcarta/header.php b/htdocs/wp-content/themes/lawcarta/header.php index bc9f684..4d26109 100644 --- a/htdocs/wp-content/themes/lawcarta/header.php +++ b/htdocs/wp-content/themes/lawcarta/header.php @@ -58,7 +58,10 @@ $scripts = []; })(window,document,'script','dataLayer','GTM-K8LWZ6K');"]; ?> 'comment', 'source' =>'End Google Tag Manager']; ?> - + @@ -77,7 +80,7 @@ $scripts = []; - +