PluginProbe
Fluent Support – Helpdesk & Customer Support Ticket System / 1.10.0
Fluent Support – Helpdesk & Customer Support Ticket System v1.10.0
2.4.0 2.3.2 2.3.1 2.3.0 2.2.1 2.2.0 trunk 1.10.0 1.10.1 1.10.2 1.10.3 1.10.4 1.10.5 1.4.0 1.4.1 1.4.2 1.4.5 1.4.6 1.4.7 1.5.0 1.5.1 1.5.2 1.5.3 1.5.4 1.5.5 All 68 releases
fluent-support / app / Hooks / actions.php

actions.php in Fluent Support – Helpdesk & Customer Support Ticket System 1.10.0, at app/Hooks/actions.php

87 lines 3.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * @var $app FluentSupport\Framework\Foundation\Application
5 */
6
7 (new \FluentSupport\App\Hooks\Handlers\AuthHandler)->init();
8
9 $app->addCustomAction('handle_exception', 'ExceptionHandler@handle');
10
11 $app->addAction('admin_menu', 'Menu@add');
12 $app->addAction('admin_enqueue_scripts', 'Menu@maybeEnqueueAssets');
13 /*
14 * Admin Bar
15 */
16 $app->addAction('admin_bar_menu', 'AdminBarHandler@init');
17 $app->addAction('wp_dashboard_setup', 'AdminBarHandler@initAdminWidget');
18
19 $app->addShortcode('fluent_support_portal', 'ShortcodeHandler@fluentSupportPortal');
20
21 // init integrations
22 add_action('init', function () {
23 (new \FluentSupport\App\Services\Integrations\IntegrationInit())->init();
24 });
25
26 // Activities
27 (new \FluentSupport\App\Hooks\Handlers\ActivityLogger())->init();
28
29 //AI Activities
30 (new \FluentSupport\App\Hooks\Handlers\AIActivityLogger())->init();
31
32 /*
33 * Email Notification Hooks
34 */
35
36 $app->addAction('fluent_support/ticket_created', 'EmailNotificationHandler@ticketCreated', 10, 2);
37 $app->addAction('fluent_support/response_added_by_agent', 'EmailNotificationHandler@agentReplied', 10, 3);
38 $app->addAction('fluent_support/response_added_by_customer', 'EmailNotificationHandler@customerReplied', 10, 3);
39 $app->addAction('fluent_support/ticket_closed_by_agent', 'EmailNotificationHandler@closedByAgent', 10, 2);
40 $app->addAction('fluent_support/agent_assigned_to_ticket', 'EmailNotificationHandler@onAgentAssign', 10, 3);
41 $app->addAction('fluent_support/ticket_created_behalf_of_customer', 'EmailNotificationHandler@ticketCreatedByAgent', 10, 3);
42
43 // Cleanup
44 $app->addAction('fluent_support_hourly_tasks', 'CleanupHandler@initHourlyTasks');
45 $app->addAction('fluent_support_daily_tasks', 'CleanupHandler@initDailyTasks');
46 $app->addAction('fluent_support_weekly_tasks', 'CleanupHandler@maybeMaintanceTask');
47
48 $app->addAction('fluent_support/deleting_ticket', 'CleanupHandler@deleteTicketAttachments');
49 $app->addAction('fluent_support/ticket_closed', 'CleanupHandler@maybeDeleteAttachmentsOnClose');
50
51 if(isset($_GET['fs_view'])) {
52 $app->addAction('init', 'ExternalPages@route');
53 }
54
55 if (isset($_GET['fst_file'])) {
56 add_action('init', function () {
57 (new \FluentSupport\App\Hooks\Handlers\ExternalPages())->view_attachment();
58 });
59 }
60
61 // require the CLI
62 if ( defined( 'WP_CLI' ) && WP_CLI ) {
63 \WP_CLI::add_command( 'fluent_support', '\FluentSupport\App\Hooks\CLI\FluentCli' );
64 }
65
66
67 (new \FluentSupport\App\Hooks\Handlers\PermissionFilterManager)->init();
68
69 // Register the WordPress personal data exporter and eraser
70 (new \FluentSupport\App\Hooks\Handlers\PrivacyHandler())->init();
71
72 // Action will be triggered when a support customer update their profile in wp
73 $app->addAction('profile_update', '\FluentSupport\App\Services\ProfileInfoService@onWPProfileUpdate', 10, 3);
74 $app->addAction('wp_ajax_fs_export_agent_report', 'FluentSupport\App\Hooks\Handlers\DataExporter@exportReport');
75
76 // LiteSpeed Cache ESI mode enabled issue fixed
77 if(defined('LSCWP_V')){
78 add_action('litespeed_init', function (){
79 if(isset($_SERVER['REQUEST_URI']) && strpos($_SERVER['REQUEST_URI'], 'fluent-support') !== false){
80 defined( 'LITESPEED_ESI_OFF' ) || define( 'LITESPEED_ESI_OFF', true );
81 }
82 });
83 }
84
85 $app->addAction('init', 'BlockEditorHandler@init');
86
87