%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /home/eirtvhdf/makkitrust.org/wp-content/plugins/wp-gdpr-compliance/WordPress/
Upload File :
Create Path :
Current File : /home/eirtvhdf/makkitrust.org/wp-content/plugins/wp-gdpr-compliance/WordPress/Cron.php

<?php
namespace WPGDPRC\WordPress;

use WPGDPRC\WordPress\Cron\DeactivateRequest;
use WPGDPRC\WordPress\Cron\ProcessRequest;

/**
 * Class Cron
 * @package WPGDPRC\WordPress
 */
class Cron {

	const KEY_MONTHLY = Plugin::PREFIX . '-monthly';

	/**
	 * Cron constructor
	 */
	public static function init() {
		add_filter( 'cron_schedules', [ self::class, 'addSchedules' ] );

		DeactivateRequest::init();
		ProcessRequest::init();
	}

	/**
	 * @param array $schedules
	 * @return array
	 */
	public static function addSchedules( $schedules = [] ) {
		$schedules[ self::KEY_MONTHLY ] = [
			'interval' => 30.5 * DAY_IN_SECONDS,
			'display'  => _x( 'Once a month', 'admin', 'wp-gdpr-compliance' ),
		];
		return $schedules;
	}

}

Zerion Mini Shell 1.0