| Server IP : 35.236.43.222 / Your IP : 216.73.216.143 Web Server : Apache System : Linux order-form-vm-001 5.10.0-37-cloud-amd64 #1 SMP Debian 5.10.247-1 (2025-12-11) x86_64 User : deploy ( 1002) PHP Version : 8.1.31 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/ravel.network/public/wp-content/plugins/independent-analytics/IAWP/ |
Upload File : |
<?php
namespace IAWP;
use IAWP\Utils\Salt;
use IAWP\Utils\Timezone;
/** @internal */
class Cron_Manager
{
public function __construct()
{
\add_action('update_option_iawp_visitor_salt_refresh_interval', [$this, 'schedule'], 10, 0);
\add_action('add_option_iawp_visitor_salt_refresh_interval', [$this, 'schedule'], 10, 0);
\add_action('iawp_refresh_salt', [$this, 'handle']);
}
public function schedule()
{
\wp_unschedule_hook('iawp_refresh_salt');
$interval = \IAWP\VisitorSaltRefreshInterval::interval();
if ($interval === 'never') {
return;
}
$refresh_time = new \DateTime('tomorrow midnight', Timezone::site_timezone());
\wp_schedule_event($refresh_time->getTimestamp(), $interval, 'iawp_refresh_salt');
}
public function handle()
{
Salt::refresh_visitor_token_salt();
}
}