PluginProbe
Fluent Booking – The Ultimate Appointments Scheduling, Events Booking, Events Calendar Solution / trunk
Fluent Booking – The Ultimate Appointments Scheduling, Events Booking, Events Calendar Solution vtrunk
2.4.0 2.3.0 2.2.5 2.2.0 2.1.2 2.1.1 trunk 1.10.0 1.10.01 1.10.02 1.5.0 1.5.01 1.5.02 1.5.1 1.5.10 1.5.20 1.5.21 1.5.22 1.5.23 1.5.24 1.5.25 1.6.0 1.7.0 1.7.1 1.7.2 All 33 releases
fluent-booking / boot / action_scheduler_loader.php

action_scheduler_loader.php in Fluent Booking – The Ultimate Appointments Scheduling, Events Booking, Events Calendar Solution trunk, at boot/action_scheduler_loader.php

42 lines 2.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php defined('ABSPATH') or die;
2
3 if (!function_exists('fluentwp_scheduler_register') && function_exists('add_action')) { // WRCS: DEFINED_VERSION.
4
5 if (!class_exists('ActionScheduler_Versions', false)) {
6 require_once FLUENT_BOOKING_DIR . 'vendor/woocommerce/action-scheduler/classes/ActionScheduler_Versions.php';
7 add_action('plugins_loaded', array('ActionScheduler_Versions', 'initialize_latest_version'), 1, 0);
8 }
9
10 add_action('plugins_loaded', 'fluentwp_scheduler_register', 0, 0); // WRCS: DEFINED_VERSION.
11
12 /**
13 * Registers this version of Action Scheduler.
14 */
15 function fluentwp_scheduler_register()
16 { // WRCS: DEFINED_VERSION.
17 $versions = ActionScheduler_Versions::instance();
18 $versions->register('3.6.9', 'fluentwp_scheduler_initialize'); // WRCS: DEFINED_VERSION.
19 }
20
21 /**
22 * Initializes this version of Action Scheduler.
23 */
24 function fluentwp_scheduler_initialize()
25 { // WRCS: DEFINED_VERSION.
26 // A final safety check is required even here, because historic versions of Action Scheduler
27 // followed a different pattern (in some unusual cases, we could reach this point and the
28 // ActionScheduler class is already defined—so we need to guard against that).
29 if (!class_exists('ActionScheduler', false)) {
30 require_once FLUENT_BOOKING_DIR . 'vendor/woocommerce/action-scheduler/classes/abstracts/ActionScheduler.php';
31 ActionScheduler::init(FLUENT_BOOKING_DIR . 'vendor/woocommerce/action-scheduler/action-scheduler.php');
32 }
33 }
34
35 // Support usage in themes - load this version if no plugin has loaded a version yet.
36 if (did_action('plugins_loaded') && !doing_action('plugins_loaded') && !class_exists('ActionScheduler', false)) {
37 fluentwp_scheduler_initialize(); // WRCS: DEFINED_VERSION.
38 do_action('action_scheduler_pre_theme_init'); // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound
39 ActionScheduler_Versions::initialize_latest_version();
40 }
41 }
42