PluginProbe
WANotifier for Forms and Actions / 2.7.13
WANotifier for Forms and Actions v2.7.13
3.1.1 3.1.0 3.0.4 2.7.10 2.7.11 2.7.12 2.7.13 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 2.7.8 2.7.9 3.0.0 3.0.1 3.0.2 3.0.3 trunk 0.1.0 0.1.1 1.0.0 1.0.1 1.0.2 All 67 releases
notifier / libraries / action-scheduler / action-scheduler.php

action-scheduler.php in WANotifier for Forms and Actions 2.7.13, at libraries/action-scheduler/action-scheduler.php

66 lines 2.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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.5.4
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 * @package ActionScheduler
27 */
28
29 if ( ! function_exists( 'action_scheduler_register_3_dot_5_dot_4' ) && function_exists( 'add_action' ) ) { // WRCS: DEFINED_VERSION.
30
31 if ( ! class_exists( 'ActionScheduler_Versions', false ) ) {
32 require_once __DIR__ . '/classes/ActionScheduler_Versions.php';
33 add_action( 'plugins_loaded', array( 'ActionScheduler_Versions', 'initialize_latest_version' ), 1, 0 );
34 }
35
36 add_action( 'plugins_loaded', 'action_scheduler_register_3_dot_5_dot_4', 0, 0 ); // WRCS: DEFINED_VERSION.
37
38 /**
39 * Registers this version of Action Scheduler.
40 */
41 function action_scheduler_register_3_dot_5_dot_4() { // WRCS: DEFINED_VERSION.
42 $versions = ActionScheduler_Versions::instance();
43 $versions->register( '3.5.4', 'action_scheduler_initialize_3_dot_5_dot_4' ); // WRCS: DEFINED_VERSION.
44 }
45
46 /**
47 * Initializes this version of Action Scheduler.
48 */
49 function action_scheduler_initialize_3_dot_5_dot_4() { // WRCS: DEFINED_VERSION.
50 // A final safety check is required even here, because historic versions of Action Scheduler
51 // followed a different pattern (in some unusual cases, we could reach this point and the
52 // ActionScheduler class is already defined—so we need to guard against that).
53 if ( ! class_exists( 'ActionScheduler', false ) ) {
54 require_once __DIR__ . '/classes/abstracts/ActionScheduler.php';
55 ActionScheduler::init( __FILE__ );
56 }
57 }
58
59 // Support usage in themes - load this version if no plugin has loaded a version yet.
60 if ( did_action( 'plugins_loaded' ) && ! doing_action( 'plugins_loaded' ) && ! class_exists( 'ActionScheduler', false ) ) {
61 action_scheduler_initialize_3_dot_5_dot_4(); // WRCS: DEFINED_VERSION.
62 do_action( 'action_scheduler_pre_theme_init' );
63 ActionScheduler_Versions::initialize_latest_version();
64 }
65 }
66