| 1 |
<?php |
| 2 |
/** |
| 3 |
* Plugin Name: Custom 404 Pro |
| 4 |
* Plugin URI: https://wordpress.org/plugins/custom-404-pro/ |
| 5 |
* Description: Override the default 404 page with any page or a custom URL from the Admin Panel. |
| 6 |
* Version: 3.15.0 |
| 7 |
* Author: Kunal Nagar |
| 8 |
* Author URI: https://www.kunalnagar.in |
| 9 |
* License: GPL-2.0+ |
| 10 |
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt |
| 11 |
* Text Domain: custom-404-pro |
| 12 |
* Domain Path: /languages |
| 13 |
* |
| 14 |
* @package Custom_404_Pro |
| 15 |
*/ |
| 16 |
|
| 17 |
if ( ! defined( 'WPINC' ) ) { |
| 18 |
die; |
| 19 |
} |
| 20 |
|
| 21 |
define( 'CUSTOM_404_PRO_VERSION', '3.15.0' ); |
| 22 |
|
| 23 |
/** |
| 24 |
* Runs on plugin activation. |
| 25 |
*/ |
| 26 |
function activate_custom_404_pro() { |
| 27 |
include_once plugin_dir_path( __FILE__ ) . 'includes/class-activateclass.php'; |
| 28 |
ActivateClass::activate(); |
| 29 |
} |
| 30 |
|
| 31 |
/** |
| 32 |
* Runs on plugin deactivation. |
| 33 |
*/ |
| 34 |
function deactivate_custom_404_pro() { |
| 35 |
include_once plugin_dir_path( __FILE__ ) . 'includes/class-deactivateclass.php'; |
| 36 |
DeactivateClass::deactivate(); |
| 37 |
} |
| 38 |
|
| 39 |
/** |
| 40 |
* Runs on plugin uninstall. |
| 41 |
*/ |
| 42 |
function uninstall_custom_404_pro() { |
| 43 |
include_once plugin_dir_path( __FILE__ ) . 'includes/class-uninstallclass.php'; |
| 44 |
UninstallClass::uninstall(); |
| 45 |
} |
| 46 |
|
| 47 |
register_activation_hook( __FILE__, 'activate_custom_404_pro' ); |
| 48 |
register_deactivation_hook( __FILE__, 'deactivate_custom_404_pro' ); |
| 49 |
register_uninstall_hook( __FILE__, 'uninstall_custom_404_pro' ); |
| 50 |
|
| 51 |
require plugin_dir_path( __FILE__ ) . 'includes/class-pluginclass.php'; |
| 52 |
require plugin_dir_path( __FILE__ ) . 'admin/class-helpers.php'; |
| 53 |
|
| 54 |
/** |
| 55 |
* Initialises and runs the plugin. |
| 56 |
*/ |
| 57 |
function run_custom_404_pro() { |
| 58 |
Helpers::singleton(); |
| 59 |
new PluginClass(); |
| 60 |
} |
| 61 |
|
| 62 |
run_custom_404_pro(); |
| 63 |
|