This commit is contained in:
Gregory Pradun
2021-07-29 16:16:15 +03:00
parent b8b9d3beaa
commit 64ffe537e3

View File

@@ -354,4 +354,13 @@ add_filter( 'robots_txt', function( $output, $public ) {
return $output;
}, 99, 2 ); // Priority 99, Number of Arguments 2.
}, 99, 2 ); // Priority 99, Number of Arguments 2.
function mark_redirected_user(){
if(isset($_GET['law']) && $_GET['law'] == 1){
$cookieDomain = (LAWCARTA_ENVIRONMENT_NAME == 'local') ? 'livecarta.loc' : 'livecarta.com';
setcookie('law_'.LAWCARTA_ENVIRONMENT_NAME, 1,0,"/", $cookieDomain);
}
}
add_action( "template_redirect", "mark_redirected_user" );