WPDD

WordPress Develop & Design

Version change just for one day and by IP

$t='0';
$currentDate = date('Y-m-d');

// The target date
$targetDate = '2025-02-26';

// Check if the current date equals the target date
// Allowed IPs for debugging
$allowedIPs = '2a06:c701:7192:9500:68e5:7b04:146b:156d'; // Add your IP here

// Get the user's IP address
$userIP = $_SERVER['REMOTE_ADDR'];
// error_log($userIP);
// Check if the current date matches the target date or if the user's IP is in the allowed list
if ($currentDate === $targetDate && $userIP === $allowedIPs) { 
// if ($currentDate === $targetDate) {
	$t=time();
}
$version = '1.0226.'.$t;