Disclaimer that will show every refresh of the page
Hello I have here a code that is based on a where you first access the page you will see the Disclaimer template but I want it to show every time I refresh the page
?php
// DISCLAIMER CHECK
$ip = TCG_RETURN_IP();
$disclaimer_option = 'tcg_disclaimer_'.$ip;
$get_disclaimer = get_option($disclaimer_option);
$date_now = new DateTime();
$date_now = $date_now-setTimezone( new DateTimeZone('GMT+1') );
if( (TCG_CHECK_DISCLAIMER() != false) || (TCG_CHECK_DISCLAIMER() != '') ){
// if($date_now$get_disclaimer){
if($date_now$get_disclaimer){
delete_option($disclaimer_option);
get_template_part('topcitygirls/templates/topcity','disclaimer');
//get_template_part('topcitygirls/templates/topcity','header');
echo 'true';
}else{
get_template_part('topcitygirls/templates/topcity','header');
}
}else{
if( is_user_logged_in() ) {
get_template_part('topcitygirls/templates/topcity','disclaimer');
}else{
$date_expire = clone $date_now;
$date_expire = $date_expire-add(new DateInterval('PT1H'));
update_option($disclaimer_option,$date_expire);
get_template_part('topcitygirls/templates/topcity','header');
}
}
get_template_part('topcitygirls/templates/topcity','passwords');
?