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-run.php

    r3161036 r3362936  
    158158    // Add wpvulnerability-config option if it does not exist.
    159159    if ( ! $config_key( 'wpvulnerability-config' ) ) {
    160         $default_config = array(
    161             'emails' => get_bloginfo( 'admin_email' ),
    162             'period' => 'weekly',
    163         );
    164         $add_option( 'wpvulnerability-config', $default_config );
     160                                                                $default_config = array(
     161                                                                    'emails'        => get_bloginfo( 'admin_email' ),
     162                                                                    'period'        => 'weekly',
     163                                                                    'day'           => 'monday',
     164                                                                    'hour'          => 0,
     165                                                                    'minute'        => 0,
     166                                                                    'cache'         => 12,
     167                                                                    'notify'        => array(
     168                                                                        'email' => 'y',
     169                                                                        'slack' => 'n',
     170                                                                        'teams' => 'n',
     171                                                                    ),
     172                                                                    'slack_webhook' => '',
     173                                                                    'teams_webhook' => '',
     174                                                                );
     175                                                                $add_option( 'wpvulnerability-config', $default_config );
    165176    }
    166177
     
    235246            'sqlite'      => 0,
    236247        );
    237         $current_option  = $config_key( 'wpvulnerability-analyze' );
     248
     249        foreach ( array_keys( $default_analyze ) as $component ) {
     250            $constant = 'WPVULNERABILITY_HIDE_' . strtoupper( $component );
     251            if ( defined( $constant ) && constant( $constant ) ) {
     252                $default_analyze[ $component ] = 1;
     253            }
     254        }
     255        $current_option = $config_key( 'wpvulnerability-analyze' );
    238256
    239257        if ( false === $current_option ) {
     
    484502
    485503    if ( in_array( $type, $valid_types, true ) ) {
     504        $constant = 'WPVULNERABILITY_HIDE_' . strtoupper( $type );
     505        if ( defined( $constant ) && constant( $constant ) ) {
     506            return false;
     507        }
     508
    486509        return ! ( isset( $wpvulnerability_analyze[ $type ] ) && (int) $wpvulnerability_analyze[ $type ] );
    487510    }
Note: See TracChangeset for help on using the changeset viewer.