Merge pull request #5432 from gregory-p/wordpress

LAW-4359
This commit is contained in:
bivis
2021-07-29 15:17:50 +02:00
committed by GitHub

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" );