-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpathguard-redirects.php
More file actions
31 lines (25 loc) · 1013 Bytes
/
Copy pathpathguard-redirects.php
File metadata and controls
31 lines (25 loc) · 1013 Bytes
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
<?php
/**
* Plugin Name: PathGuard Redirects
* Description: Block specific relative URLs and redirect visitors to a custom destination. Admins are never redirected.
* Version: 1.0.0
* Requires at least: 5.8
* Requires PHP: 7.4
* Author: Samrat Hossen
* License: GPL-2.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: pathguard-redirects
*
* @package EasyURLBlocker
*/
defined( 'ABSPATH' ) || exit;
/** Absolute path to this plugin's root directory (with trailing slash). */
define( 'URLB_PATH', plugin_dir_path( __FILE__ ) );
require_once URLB_PATH . 'includes/AdminSettings.php';
require_once URLB_PATH . 'includes/URLB_Blocker.php';
use URLBlocker\AdminSettings;
use URLBlocker\URLB_Blocker;
register_activation_hook( __FILE__, array( AdminSettings::class, 'activate' ) );
register_deactivation_hook( __FILE__, array( AdminSettings::class, 'deactivate' ) );
new AdminSettings();
new URLB_Blocker();