PluginProbe
Defender Security – Malware Scanner, Login Security & Firewall / 3.1.0
Defender Security – Malware Scanner, Login Security & Firewall v3.1.0
6.3.0 6.2.3 6.2.4 6.2.0 6.2.1 6.2.2 6.1.0 5.3.1 5.4.0 5.4.1 5.5.0 5.5.1 5.6.0 5.6.1 5.6.2 5.7.0 5.7.1 5.7.2 5.8.0 5.8.1 5.9.0 6.0.0 6.0.1 3.0.1 3.1.0 All 141 releases
defender-security / src / routes.php

routes.php in Defender Security – Malware Scanner, Login Security & Firewall 3.1.0, at src/routes.php

110 lines 3.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if ( ! defined( 'ABSPATH' ) ) {
3 die;
4 }
5
6 function defender_init_routes() {
7 $routes = [
8 'mask_login' => [
9 'update_settings' => 'save_settings',
10 'get_posts' => 'get_posts',
11 ],
12 'security_headers' => [
13 'update_settings' => 'save_settings'
14 ],
15 'two_fa' => [
16 'update_settings' => 'save_settings',
17 'send_test_email' => 'send_test_email',
18 'verify_otp_for_enabling' => 'verify_otp_for_enabling',
19 'disable_totp' => 'disable_totp',
20 'send_backup_code' => [ 'send_backup_code', true ],
21 'generate_backup_codes' => 'generate_backup_codes',
22 ],
23 'security_tweaks' => [
24 'process' => 'process',
25 'ignore' => 'ignore',
26 'revert' => 'revert',
27 'restore' => 'restore',
28 'recheck' => 'recheck',
29 'bulk' => 'bulk_hub',
30 'update_security_reminder' => 'update_security_reminder',
31 'update_autogenerate_flag' => 'update_autogenerate_flag',
32 'update_enabled_user_enums' => 'update_enabled_user_enums',
33 ],
34 'ip_lockout' => [
35 'update_settings' => 'save_settings',
36 'download_geo_db' => 'download_geo_db',
37 'import_ips' => 'import_ips',
38 'query_locked_ips' => 'query_locked_ips',
39 'ip_action' => 'ip_action',
40 'export_ips' => 'export_ips',
41 'empty_logs' => 'empty_logs',
42 'dashboard_activation' => 'dashboard_activation',
43 'import_ua' => 'import_ua',
44 'export_ua' => 'export_ua',
45 ],
46 'scan' => [
47 'start' => 'start',
48 'cancel' => 'cancel',
49 'process' => [ 'process', true ],
50 'status' => 'status',
51 'item_hub' => 'item_hub',
52 'update_settings' => 'save_settings',
53 'bulk_hub' => 'bulk_hub'
54 ],
55 'audit' => [
56 'update_settings' => 'save_settings',
57 'pull_logs' => 'pull_logs',
58 'summary' => 'summary',
59 'export_as_csv' => 'export_as_csv'
60 ],
61 'notification' => [
62 'get_users' => 'get_users',
63 'save_notification' => 'save_notification',
64 'unscubscribe' => 'unsubscribe',
65 'subscribe' => 'subscribe',
66 'save_frequency' => 'save_frequency',
67 'save_subscriber' => 'save_subscriber',
68 'save_configs' => 'save_configs',
69 'save_bulk_configs' => 'save_bulk_configs',
70 'bulk_deactivate' => 'bulk_deactivate',
71 'validate_email' => 'validate_email',
72 ],
73 'dashboard' => [
74 'hide_new_features' => 'hide_new_features',
75 ],
76 'settings' => [
77 'update_settings' => 'save_settings',
78 'reset_settings' => 'reset_settings'
79 ],
80 'waf' => [
81 'recheck' => 'recheck'
82 ],
83 'onboard' => [
84 'activating' => 'activating',
85 'skip' => 'skip',
86 ],
87 'tutorial' => [
88 'hide' => 'hide'
89 ],
90 'blocklist_monitor' => [
91 'blacklist_status' => 'blacklist_status',
92 'toggle_blacklist_status' => 'toggle_blacklist_status',
93 ],
94 ];
95 foreach ( $routes as $module => $info ) {
96 foreach ( $info as $name => $func ) {
97 $nopriv = false;
98 if ( is_array( $func ) ) {
99 [$func, $nopriv] = $func;
100 }
101 \Calotes\Helper\Route::register_route( $name, $module, $name, [
102 \Calotes\Helper\Array_Cache::get( $module ),
103 $func
104 ], $nopriv );
105 }
106 }
107 }
108
109 defender_init_routes();
110