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 / app / Hooks / actions.php

actions.php in Fluent Booking – The Ultimate Appointments Scheduling, Events Booking, Events Calendar Solution trunk, at app/Hooks/actions.php

57 lines 2.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 defined('ABSPATH') || exit;
4
5 /**
6 * All registered action's handlers should be in app\Hooks\Handlers,
7 * addAction is similar to add_action and addCustomAction is just a
8 * wrapper over add_action which will add a prefix to the hook name
9 * using the plugin slug to make it unique in all wordpress plugins,
10 * ex: $app->addCustomAction('foo', ['FooHandler', 'handleFoo']) is
11 * equivalent to add_action('slug-foo', ['FooHandler', 'handleFoo']).
12 */
13
14 /**
15 * @var $app FluentBooking\Framework\Foundation\Application
16 */
17
18 /*
19 * Register all the grouped action handlers
20 */
21
22 (new \FluentBooking\App\Hooks\Handlers\FrontEndHandler())->register();
23 (new \FluentBooking\App\Hooks\Handlers\CleanupHandlers\CleanupHandler())->register();
24 (new \FluentBooking\App\Hooks\Handlers\NotificationHandler())->register();
25 (new \FluentBooking\App\Hooks\Handlers\LogHandler())->register();
26 (new \FluentBooking\App\Hooks\Handlers\AdminMenuHandler())->register();
27 (new \FluentBooking\App\Hooks\Scheduler\FiveMinuteScheduler())->register();
28 (new \FluentBooking\App\Hooks\Scheduler\DailyScheduler())->register();
29 (new \FluentBooking\App\Services\LandingPage\LandingPageHandler())->boot();
30
31 /*
32 * MCP (Model Context Protocol) server for AI agents.
33 * Ships off — boot() only registers the Toolkit discovery filters until an
34 * operator enables it in Settings. See docs/mcp-server-spec.md.
35 */
36 \FluentBooking\App\Modules\MCP\MCPInit::boot();
37
38
39 /*
40 * Register all the single action handlers
41 */
42 $app->addAction('init', 'BlockEditorHandler@init');
43
44 $app->addAction('wp_ajax_fluent_booking_export_calendar', 'DataExporter@exportCalendar');
45 $app->addAction('wp_ajax_fluent_booking_export_hosts', 'DataExporter@exportBookingHosts');
46 $app->addAction('wp_ajax_fluent_booking_import_calendar', 'DataImporter@importCalendar');
47
48 $app->addAction('fluent_booking/after_calendar_event_landing_page', function () {
49 echo wp_kses_post(\FluentBooking\App\Services\LandingPage\LandingPageHelper::getPoweredByHtml());
50 }, 10);
51
52 add_action('init', function () {
53 if (!isset($_REQUEST['gcal'])) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
54 return;
55 }
56 });
57