This commit is contained in:
Javier Casares 2026-07-09 06:20:06 +00:00
commit 31f7e97d39

View file

@ -92,11 +92,10 @@ function wpvulnerability_plugins_get_current_signature() {
*
* @param string $plugin_file Main plugin folder/file name.
* @param array<string, mixed> $plugin_data Plugin data array containing information about the plugin.
* @param string $plugin_status Plugin status (active, inactive, etc.).
*
* @return void
*/
function wpvulnerability_plugin_info_after( $plugin_file, $plugin_data, $plugin_status = '' ) {
function wpvulnerability_plugin_info_after( $plugin_file, $plugin_data ) {
// Retrieve the vulnerabilities for all plugins from the options table and decode the JSON.
$raw_plugins = is_multisite() ? get_site_option( 'wpvulnerability-plugins', '' ) : get_option( 'wpvulnerability-plugins', '' );
@ -112,7 +111,7 @@ function wpvulnerability_plugin_info_after( $plugin_file, $plugin_data, $plugin_
// Generate the vulnerability notice message with the plugin name.
$message = sprintf(
/* translators: 1: Plugin name */
/* translators: 1: Plugin or theme name. */
__( '%1$s has a known vulnerability that may be affecting your installed version.', 'wpvulnerability' ),
wp_kses( is_scalar( $plugin_data['Name'] ) ? (string) $plugin_data['Name'] : '', 'strip' )
);
@ -649,7 +648,7 @@ function wpvulnerability_plugin_page() {
if ( is_array( $plugin_data ) && isset( $plugin_data['vulnerable'] ) ) {
$vulnerable_raw = $plugin_data['vulnerable'];
if ( 1 === ( is_scalar( $vulnerable_raw ) ? intval( $vulnerable_raw ) : 0 ) ) {
add_action( 'after_plugin_row_' . $file_path, 'wpvulnerability_plugin_info_after', 10, 3 );
add_action( 'after_plugin_row_' . $file_path, 'wpvulnerability_plugin_info_after', 10, 2 );
}
}
}