Changeset 3362936 for wpvulnerability/trunk/wpvulnerability.php
- Timestamp:
- 09/17/2025 06:49:03 AM (6 months ago)
- File:
-
- 1 edited
-
wpvulnerability/trunk/wpvulnerability.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
wpvulnerability/trunk/wpvulnerability.php
r3267956 r3362936 4 4 * Plugin URI: https://www.wpvulnerability.com/ 5 5 * Description: Receive information about possible vulnerabilities in your WordPress from WordPress Vulnerability Database API. 6 * Requires at least: 4. 16 * Requires at least: 4.7 7 7 * Requires PHP: 5.6 8 * Version: 4. 0.48 * Version: 4.1.0 9 9 * Author: Javier Casares 10 10 * Author URI: https://www.javiercasares.com/ … … 24 24 * Set some constants that I can change in future versions. 25 25 */ 26 define( 'WPVULNERABILITY_PLUGIN_VERSION', '4. 0.4' );26 define( 'WPVULNERABILITY_PLUGIN_VERSION', '4.1.0' ); 27 27 define( 'WPVULNERABILITY_API_HOST', 'https://www.wpvulnerability.net/' ); 28 define( 'WPVULNERABILITY_CACHE_HOURS', 12 );29 28 30 29 /** … … 36 35 define( 'WPVULNERABILITY_PLUGIN_PATH', plugin_dir_path( __FILE__ ) ); 37 36 37 // Handle front-end email opt-out requests early. 38 if ( isset( $_GET['wpvulnerability_disable_email'] ) ) { // phpcs:ignore 39 // Load pluggable functions so wp_verify_nonce() is available. 40 if ( ! function_exists( 'wp_verify_nonce' ) ) { 41 require_once ABSPATH . WPINC . '/pluggable.php'; 42 } 43 44 require_once WPVULNERABILITY_PLUGIN_PATH . '/wpvulnerability-notifications.php'; 45 wpvulnerability_disable_email_handler(); 46 } 47 38 48 /** 39 49 * Initialize the plugin. … … 44 54 */ 45 55 function wpvulnerability_plugin_init() { 46 /*47 * Load the plugin's localization files.48 *49 * @since 2.0.050 */51 load_plugin_textdomain( 'wpvulnerability', false, dirname( WPVULNERABILITY_PLUGIN_BASE ) . '/languages' );52 53 56 wpvulnerability_activation(); 54 57 … … 89 92 require_once WPVULNERABILITY_PLUGIN_PATH . '/wpvulnerability-notifications.php'; 90 93 require_once WPVULNERABILITY_PLUGIN_PATH . '/wpvulnerability-sitehealth.php'; 91 require_once WPVULNERABILITY_PLUGIN_PATH . '/wpvulnerability-cli.php'; 94 require_once WPVULNERABILITY_PLUGIN_PATH . '/class-wpvulnerability-cli.php'; 95 require_once WPVULNERABILITY_PLUGIN_PATH . '/class-wpvulnerability-config-cli.php'; 92 96 93 // Update non-cached data. 94 wpvulnerability_expired_database_data(); 97 // Update non-cached data. 98 wpvulnerability_expired_database_data(); 99 } 100 101 /* 102 * Backward compatibility for wp_doing_cron(). 103 * 104 * wp_doing_cron() was introduced in WordPress 4.8. This plugin supports 105 * versions as old as WordPress 4.7, so define the function when it does not 106 * exist in core. 107 * 108 * @since 4.1.1 109 */ 110 if ( ! function_exists( 'wp_doing_cron' ) ) { 111 /** 112 * Determines whether the current request is a WordPress cron request. 113 * 114 * Mirrors the core wp_doing_cron() function available since 4.8.0. 115 * 116 * @since 4.1.1 117 * 118 * @return bool Whether the current request is a WordPress cron request. 119 */ 120 function wp_doing_cron() { 121 return apply_filters( 'wp_doing_cron', defined( 'DOING_CRON' ) && DOING_CRON ); 122 } 95 123 } 96 124 … … 99 127 */ 100 128 if ( 101 ( ! is_multisite() && is_admin() ) ||129 ( ! is_multisite() && is_admin() ) || 102 130 ( is_multisite() && ( is_network_admin() || is_main_site() ) ) || 103 131 ( defined( 'WP_CLI' ) && WP_CLI ) ||
Note: See TracChangeset
for help on using the changeset viewer.