-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsmartshield.php
More file actions
54 lines (45 loc) · 1.49 KB
/
smartshield.php
File metadata and controls
54 lines (45 loc) · 1.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<?php
/**
* Plugin Name: Smart Shield
* Description: Smart Shield - AI Spam Shield Plugin for WordPress.
* Version: 1.0.0
* Author: Rajan, Manish, Mohan
* Author URI: https://github.com/vplugins
* Text Domain: smart-shield
* License: GPL-2.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Requires at least: 5.0
* Requires PHP: 7.4
*/
defined( 'ABSPATH' ) || exit;
// Autoload dependencies using Composer
if ( file_exists( __DIR__ . '/vendor/autoload.php' ) ) {
require __DIR__ . '/vendor/autoload.php';
}
use SmartShield\Admin\SettingsPage;
use SmartShield\Front\IPBlockerFrontend;
use SmartShield\Front\LoginHandlerFrontend;
use SmartShield\Front\SpamHandlerFrontend;
use SmartShield\Front\EmailHandlerFrontend;
use SmartShield\Modules\LoginHandler\LoginHandler;
use SmartShield\Modules\SpamHandler\SpamHandler;
use SmartShield\Modules\EmailHandler\EmailHandler;
// Initialize the plugin
function smart_shield_init() {
// Load admin settings and logs page
if ( is_admin() ) {
new SettingsPage();
}
// Load frontend IP blocker
new IPBlockerFrontend();
// Load login handler (both backend and frontend)
new LoginHandler();
new LoginHandlerFrontend();
// Load spam handler (both backend and frontend)
new SpamHandler();
new SpamHandlerFrontend();
// Load email handler (both backend and frontend)
new EmailHandler();
new EmailHandlerFrontend();
}
add_action( 'plugins_loaded', 'smart_shield_init' );