classes
5 years ago
deprecated
5 years ago
lib
5 years ago
action-scheduler.php
5 years ago
functions.php
5 years ago
license.txt
5 years ago
action-scheduler.php
54 lines
| 1 | <?php |
| 2 | /* |
| 3 | * Plugin Name: Action Scheduler |
| 4 | * Plugin URI: https://actionscheduler.org |
| 5 | * Description: A robust scheduling library for use in WordPress plugins. |
| 6 | * Author: Automattic |
| 7 | * Author URI: https://automattic.com/ |
| 8 | * Version: 3.1.6 |
| 9 | * License: GPLv3 |
| 10 | * |
| 11 | * Copyright 2019 Automattic, Inc. (https://automattic.com/contact/) |
| 12 | * |
| 13 | * This program is free software: you can redistribute it and/or modify |
| 14 | * it under the terms of the GNU General Public License as published by |
| 15 | * the Free Software Foundation, either version 3 of the License, or |
| 16 | * (at your option) any later version. |
| 17 | * |
| 18 | * This program is distributed in the hope that it will be useful, |
| 19 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 20 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 21 | * GNU General Public License for more details. |
| 22 | * |
| 23 | * You should have received a copy of the GNU General Public License |
| 24 | * along with this program. If not, see <https://www.gnu.org/licenses/>. |
| 25 | * |
| 26 | */ |
| 27 | |
| 28 | if ( ! function_exists( 'action_scheduler_register_3_dot_1_dot_6' ) ) { |
| 29 | |
| 30 | if ( ! class_exists( 'ActionScheduler_Versions' ) ) { |
| 31 | require_once( 'classes/ActionScheduler_Versions.php' ); |
| 32 | add_action( 'plugins_loaded', array( 'ActionScheduler_Versions', 'initialize_latest_version' ), 1, 0 ); |
| 33 | } |
| 34 | |
| 35 | add_action( 'plugins_loaded', 'action_scheduler_register_3_dot_1_dot_6', 0, 0 ); |
| 36 | |
| 37 | function action_scheduler_register_3_dot_1_dot_6() { |
| 38 | $versions = ActionScheduler_Versions::instance(); |
| 39 | $versions->register( '3.1.6', 'action_scheduler_initialize_3_dot_1_dot_6' ); |
| 40 | } |
| 41 | |
| 42 | function action_scheduler_initialize_3_dot_1_dot_6() { |
| 43 | require_once( 'classes/abstracts/ActionScheduler.php' ); |
| 44 | ActionScheduler::init( __FILE__ ); |
| 45 | } |
| 46 | |
| 47 | // Support usage in themes - load this version if no plugin has loaded a version yet. |
| 48 | if ( did_action( 'plugins_loaded' ) && ! class_exists( 'ActionScheduler' ) ) { |
| 49 | action_scheduler_initialize_3_dot_1_dot_6(); |
| 50 | do_action( 'action_scheduler_pre_theme_init' ); |
| 51 | ActionScheduler_Versions::initialize_latest_version(); |
| 52 | } |
| 53 | } |
| 54 |