Plugin Directory


Ignore:
Timestamp:
09/17/2025 06:49:03 AM (6 months ago)
Author:
JavierCasares
Message:

[4.1.0] - 2025-09-16

Added

  • "Never" send notifications.
  • Choose notification day and time.
  • Configurable cache expiration (1, 6, 12 or 24 hours).
  • WP-CLI command to configure cache expiration.
  • Constants to set hiding components.
  • WP-CLI command to manage hidden components.
  • WP-CLI command to configure notification email and period.
  • Add notifications for Slack and Teams.
  • Disable mail notifications from mails.
  • WordPress Playground blueprint (in test).

Changed

  • Cache is always the same eveywhere.
  • Options for notifications.
  • Schedule fields only appear for selected periods.
  • Placeholder and conditional display for Slack and Teams notification fields.
  • Added links to documentation.

Fixed

  • When a plugin is updated, hide the vulnerabilities.
  • Display of schedule fields based on period.
  • Conditional display for email, Slack, and Teams notification fields.
  • When save, there where two saving messages.
  • wp_get_update_php_url() for WordPress 5.1.0+ (fallback)
  • wp_timezone() for WordPress 5.1.0+ (fallback)
  • wp_doing_cron() for WordPress 4.8.0+ (fallback)
  • Application Passwords / REST API after WordPress 5.6.0

Compatibility

  • WordPress: 4.7 - 6.9
  • PHP: 5.6 - 8.4
  • WP-CLI: 2.3.0 - 2.11.0

Tests

  • PHP Coding Standards: 3.13.4
  • WordPress Coding Standards: 3.2.0
  • Plugin Check (PCP): 1.6.0
  • SonarCloud Code Review
  • Amplify Code Check
File:
1 edited

Legend:

Unmodified
Added
Removed
  • wpvulnerability/trunk/wpvulnerability.php

    r3267956 r3362936  
    44 * Plugin URI: https://www.wpvulnerability.com/
    55 * Description: Receive information about possible vulnerabilities in your WordPress from WordPress Vulnerability Database API.
    6  * Requires at least: 4.1
     6 * Requires at least: 4.7
    77 * Requires PHP: 5.6
    8  * Version: 4.0.4
     8 * Version: 4.1.0
    99 * Author: Javier Casares
    1010 * Author URI: https://www.javiercasares.com/
     
    2424 * Set some constants that I can change in future versions.
    2525 */
    26 define( 'WPVULNERABILITY_PLUGIN_VERSION', '4.0.4' );
     26define( 'WPVULNERABILITY_PLUGIN_VERSION', '4.1.0' );
    2727define( 'WPVULNERABILITY_API_HOST', 'https://www.wpvulnerability.net/' );
    28 define( 'WPVULNERABILITY_CACHE_HOURS', 12 );
    2928
    3029/**
     
    3635define( 'WPVULNERABILITY_PLUGIN_PATH', plugin_dir_path( __FILE__ ) );
    3736
     37// Handle front-end email opt-out requests early.
     38if ( 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
    3848/**
    3949 * Initialize the plugin.
     
    4454 */
    4555function 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 
    5356    wpvulnerability_activation();
    5457
     
    8992    require_once WPVULNERABILITY_PLUGIN_PATH . '/wpvulnerability-notifications.php';
    9093    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';
    9296
    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 */
     110if ( ! 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    }
    95123}
    96124
     
    99127 */
    100128if (
    101         ( ! is_multisite() && is_admin() ) ||
     129                ( ! is_multisite() && is_admin() ) ||
    102130        ( is_multisite() && ( is_network_admin() || is_main_site() ) ) ||
    103131        ( defined( 'WP_CLI' ) && WP_CLI ) ||
Note: See TracChangeset for help on using the changeset viewer.