<?php
/**
 * DBA_EEurope_Cron
 *
 * Manages the weekly cron schedule for Eastern Europe GeoBot.
 * Adds 'weekly' interval if not already registered.
 *
 * @since 3.0.0
 */

if ( ! defined( 'ABSPATH' ) ) exit;

class DBA_EEurope_Cron {

    public static function init() {
        add_filter( 'cron_schedules', array( __CLASS__, 'add_weekly_schedule' ) );
    }

    /**
     * Ensure 'weekly' schedule exists for WP-Cron.
     */
    public static function add_weekly_schedule( $schedules ) {
        if ( ! isset( $schedules['weekly'] ) ) {
            $schedules['weekly'] = array(
                'interval' => 604800,
                'display'  => __( 'Once Weekly', 'dba' ),
            );
        }
        return $schedules;
    }
}
