HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux mail.btech-izolacje.pl 5.15.0-140-generic #150-Ubuntu SMP Sat Apr 12 06:00:09 UTC 2025 x86_64
User: pewna6876 (1017)
PHP: 8.2.28
Disabled: NONE
Upload Files
File: /home/pewnabryka.pl/public_html/wp-content/plugins/duplicator-pro/src/Utils/CronUtils.php
<?php

namespace Duplicator\Utils;

class CronUtils
{
    const INTERVAL_DAILTY  = 'duplicator_daily_cron';
    const INTERVAL_WEEKLY  = 'duplicator_weekly_cron';
    const INTERVAL_MONTHLY = 'duplicator_monthly_cron';

    /**
     * Init WordPress hooks
     *
     * @return void
     */
    public static function init()
    {
        add_filter('cron_schedules', [self::class, 'defaultCronIntervals']);
    }

    /**
     * Add duplicator pro cron schedules
     *
     * @param array<string, array<string,int|string>> $schedules schedules
     *
     * @return array<string, array<string,int|string>>
     */
    public static function defaultCronIntervals($schedules)
    {
        $schedules[self::INTERVAL_DAILTY] = [
            'interval' => DAY_IN_SECONDS,
            'display'  => __('Once a Day', 'duplicator-pro'),
        ];

        $schedules[self::INTERVAL_WEEKLY] = [
            'interval' => WEEK_IN_SECONDS,
            'display'  => __('Once a Week', 'duplicator-pro'),
        ];

        $schedules[self::INTERVAL_MONTHLY] = [
            'interval' => MONTH_IN_SECONDS,
            'display'  => __('Once a Month', 'duplicator-pro'),
        ];

        return $schedules;
    }
}