-
Notifications
You must be signed in to change notification settings - Fork 6
/
custom-404-pro.php
executable file
·45 lines (36 loc) · 1.21 KB
/
custom-404-pro.php
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
<?php
/*
Plugin Name: Custom 404 Pro
Plugin URI: https://wordpress.org/plugins/custom-404-pro/
Description: Override the default 404 page with any page or a custom URL from the Admin Panel.
Version: 3.12.0
Author: Kunal Nagar
Author URI: https://www.kunalnagar.in
License: GPL-2.0+
License URI: http://www.gnu.org/licenses/gpl-2.0.txt
*/
if ( ! defined( 'WPINC' ) ) {
die;
}
function activate_custom_404_pro() {
include_once plugin_dir_path( __FILE__ ) . 'includes/ActivateClass.php';
ActivateClass::activate();
}
function deactivate_custom_404_pro() {
include_once plugin_dir_path( __FILE__ ) . 'includes/DeactivateClass.php';
DeactivateClass::deactivate();
}
function uninstall_custom_404_pro() {
include_once plugin_dir_path( __FILE__ ) . 'includes/UninstallClass.php';
UninstallClass::uninstall();
}
register_activation_hook( __FILE__, 'activate_custom_404_pro' );
register_deactivation_hook( __FILE__, 'deactivate_custom_404_pro' );
register_uninstall_hook( __FILE__, 'uninstall_custom_404_pro' );
require plugin_dir_path( __FILE__ ) . 'includes/PluginClass.php';
require plugin_dir_path( __FILE__ ) . 'admin/Helpers.php';
function run_custom_404_pro() {
Helpers::singleton();
new PluginClass();
}
run_custom_404_pro();