PATH:
home
/
letacommog
/
www
/
wp-content
/
plugins
/
popup-maker
/
includes
<?php /** * Cron * * @package POPMAKE * @subpackage Classes/Cron * @copyright Copyright (c) 2015, Daniel Iser * @license http://opensource.org/licenses/gpl-2.0.php GNU Public License * @since 1.3.0 */ // Exit if accessed directly if ( ! defined( 'ABSPATH' ) ) { exit; } /** * Popmake_Cron Class * * This class handles scheduled events * * @since 1.3.0 */ class Popmake_Cron { /** * Get things going * * @since 1.3.0 * @see Popmake_Cron::weekly_events() */ public function __construct() { add_filter( 'cron_schedules', array( $this, 'add_schedules' ) ); add_action( 'wp', array( $this, 'schedule_Events' ) ); } /** * Registers new cron schedules * * @since 1.3.0 * * @param array $schedules * * @return array */ public function add_schedules( $schedules = array() ) { // Adds once weekly to the existing schedules. $schedules['weekly'] = array( 'interval' => 604800, 'display' => __( 'Once Weekly', 'popup-maker' ) ); return $schedules; } /** * Schedules our events * * @access public * @since 1.3.0 * @return void */ public function schedule_Events() { $this->weekly_events(); $this->daily_events(); } /** * Schedule weekly events * * @access private * @since 1.3.0 * @return void */ private function weekly_events() { if ( ! wp_next_scheduled( 'popmake_weekly_scheduled_events' ) ) { wp_schedule_event( current_time( 'timestamp' ), 'weekly', 'popmake_weekly_scheduled_events' ); } } /** * Schedule daily events * * @access private * @since 1.3.0 * @return void */ private function daily_events() { if ( ! wp_next_scheduled( 'popmake_daily_scheduled_events' ) ) { wp_schedule_event( current_time( 'timestamp' ), 'daily', 'popmake_daily_scheduled_events' ); } } } $popmake_cron = new Popmake_Cron;
[+]
..
[-] pum-deprecated-v1.7.php
[edit]
[-] pum-template-hooks.php
[edit]
[-] input-options.php
[edit]
[-] general-functions.php
[edit]
[-] migrations.php
[edit]
[-] actions.php
[edit]
[+]
libs
[-] popup-functions.php
[edit]
[-] class-popmake-popup-theme-fields.php
[edit]
[-] pum-general-functions.php
[edit]
[-] google-fonts.php
[edit]
[+]
functions
[-] extension-list.json
[edit]
[-] defaults.php
[edit]
[-] pum-deprecated.php
[edit]
[-] theme-functions.php
[edit]
[-] pum-install-functions.php
[edit]
[+]
pum-sdk
[-] class-pum-fields.php
[edit]
[-] extensions-functions.php
[edit]
[-] license-handler.php
[edit]
[-] class-pum.php
[edit]
[+]
importer
[+]
deprecated
[-] plugin-updater.php
[edit]
[-] pum-popup-functions.php
[edit]
[-] ajax-calls.php
[edit]
[+]
admin
[-] install.php
[edit]
[+]
modules
[-] google-fonts.json
[edit]
[-] class-pum-form.php
[edit]
[-] pum-template-functions.php
[edit]
[-] compat.php
[edit]
[+]
batch
[-] class-popmake-popup-fields.php
[edit]
[-] misc-functions.php
[edit]
[-] pum-misc-functions.php
[edit]
[-] css-functions.php
[edit]
[-] class-popmake-fields.php
[edit]
[-] class-popmake-cron.php
[edit]
[-] templates.php
[edit]
[-] pum-deprecated-v1.4.php
[edit]
[-] class-pum-popup-query.php
[edit]
[+]
compatibility
[-] load-popups.php
[edit]
[+]
integrations