PluginProbe
Fluent Support – Helpdesk & Customer Support Ticket System / 1.10.4
Fluent Support – Helpdesk & Customer Support Ticket System v1.10.4
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.4, at app/Hooks/actions.php

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