| 1 |
<?php |
| 2 |
/** |
| 3 |
* Plugin Name: WPVulnerability |
| 4 |
* Plugin URI: https://vulnerability.wpsysadmin.com/ |
| 5 |
* Description: Check WordPress core, plugins, and theme vulnerabilities with information from the WordPress Vulnerability Database API. |
| 6 |
* Requires at least: 4.1 |
| 7 |
* Requires PHP: 5.6 |
| 8 |
* Version: 2.0.0 |
| 9 |
* Author: Javier Casares |
| 10 |
* Author URI: https://www.javiercasares.com/ |
| 11 |
* Text Domain: wpvulnerability |
| 12 |
* Domain Path: /languages |
| 13 |
* License: EUPL v1.2 |
| 14 |
* License URI: https://www.eupl.eu/1.2/en/ |
| 15 |
* |
| 16 |
* @package WPVulnerability |
| 17 |
* |
| 18 |
* @version 2.0.0 |
| 19 |
* |
| 20 |
*/ |
| 21 |
defined( 'ABSPATH' ) || die( 'No script kiddies please!' ); |
| 22 |
|
| 23 |
/** |
| 24 |
* Set some constants that I can change in future verions |
| 25 |
*/ |
| 26 |
define( 'WPVULNERABILITY_PLUGIN_VERSION', '2.0.0' ); |
| 27 |
define( 'WPVULNERABILITY_API_HOST', 'https://www.wpvulnerability.net/' ); |
| 28 |
define( 'WPVULNERABILITY_CACHE_HOURS', 12 ); |
| 29 |
|
| 30 |
/** |
| 31 |
* Set some useful constants |
| 32 |
*/ |
| 33 |
define( 'WPVULNERABILITY_PLUGIN_URL', plugins_url( '/', __FILE__ ) ); |
| 34 |
define( 'WPVULNERABILITY_PLUGIN_FILE', __FILE__ ); |
| 35 |
define( 'WPVULNERABILITY_PLUGIN_BASE', plugin_basename( __FILE__ ) ); |
| 36 |
define( 'WPVULNERABILITY_PLUGIN_PATH', plugin_dir_path( __FILE__ ) ); |
| 37 |
|
| 38 |
/** |
| 39 |
* Initialize the plugin. |
| 40 |
* |
| 41 |
* @since 2.0.0 |
| 42 |
* |
| 43 |
* @return void |
| 44 |
*/ |
| 45 |
function wpvulnerability_plugin_init() { |
| 46 |
/* |
| 47 |
* Load the plugin's localization files. |
| 48 |
* |
| 49 |
* @since 2.0.0 |
| 50 |
*/ |
| 51 |
load_plugin_textdomain( 'wpvulnerability', false, dirname( WPVULNERABILITY_PLUGIN_BASE ) . '/languages' ); |
| 52 |
|
| 53 |
/* |
| 54 |
* Global functions, where the magic happens. |
| 55 |
* |
| 56 |
* @since 2.0.0 |
| 57 |
*/ |
| 58 |
require_once WPVULNERABILITY_PLUGIN_PATH . '/wpvulnerability-run.php'; |
| 59 |
require_once WPVULNERABILITY_PLUGIN_PATH . '/wpvulnerability-general.php'; |
| 60 |
|
| 61 |
/* |
| 62 |
* The admin panel for the configuration. |
| 63 |
* |
| 64 |
* @since 2.0.0 |
| 65 |
*/ |
| 66 |
require_once WPVULNERABILITY_PLUGIN_PATH . '/wpvulnerability-admin.php'; |
| 67 |
|
| 68 |
/* |
| 69 |
* The functions to work with the data. |
| 70 |
* |
| 71 |
* @since 2.0.0 |
| 72 |
*/ |
| 73 |
require_once WPVULNERABILITY_PLUGIN_PATH . '/wpvulnerability-plugins.php'; |
| 74 |
require_once WPVULNERABILITY_PLUGIN_PATH . '/wpvulnerability-themes.php'; |
| 75 |
require_once WPVULNERABILITY_PLUGIN_PATH . '/wpvulnerability-core.php'; |
| 76 |
/* |
| 77 |
* All the plugin really does. |
| 78 |
* |
| 79 |
* @since 2.0.0 |
| 80 |
*/ |
| 81 |
require_once WPVULNERABILITY_PLUGIN_PATH . '/wpvulnerability-process.php'; |
| 82 |
require_once WPVULNERABILITY_PLUGIN_PATH . '/wpvulnerability-notifications.php'; |
| 83 |
require_once WPVULNERABILITY_PLUGIN_PATH . '/wpvulnerability-sitehealth.php'; |
| 84 |
require_once WPVULNERABILITY_PLUGIN_PATH . '/wpvulnerability-cli.php'; |
| 85 |
|
| 86 |
} |
| 87 |
add_action( 'plugins_loaded', 'wpvulnerability_plugin_init' ); |
| 88 |
|