v5.1.1
This commit is contained in:
parent
31f7e97d39
commit
db98c4438c
1 changed files with 123 additions and 133 deletions
|
|
@ -1447,14 +1447,6 @@ function wpvulnerability_render_network_admin_tab_logs() {
|
|||
function wpvulnerability_render_network_admin_tab_tools() {
|
||||
global $wpvulnerability_settings;
|
||||
|
||||
$tools_action = add_query_arg(
|
||||
array(
|
||||
'page' => 'wpvulnerability-options',
|
||||
'tab' => 'tools',
|
||||
),
|
||||
network_admin_url( 'settings.php' )
|
||||
);
|
||||
|
||||
$wpvulnerability_cron_config = is_multisite() ? get_site_option( 'wpvulnerability-config', array() ) : get_option( 'wpvulnerability-config', array() );
|
||||
if ( ! is_array( $wpvulnerability_cron_config ) ) {
|
||||
$wpvulnerability_cron_config = array();
|
||||
|
|
@ -2959,24 +2951,6 @@ function wpvulnerability_sanitize_config( $input ) {
|
|||
return $sanitized;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sanitizes the messages generated by the plugin (simple messages).
|
||||
*
|
||||
* @since 2.0.0
|
||||
*
|
||||
* @param array<string, mixed> $input Input values.
|
||||
* @return array<string, string> Sanitized values.
|
||||
*/
|
||||
function wpvulnerability_sanitize_messages( $input ) {
|
||||
$sanitized = array();
|
||||
|
||||
foreach ( $input as $key => $message ) {
|
||||
$sanitized[ sanitize_key( (string) $key ) ] = sanitize_text_field( is_scalar( $message ) ? (string) $message : '' );
|
||||
}
|
||||
|
||||
return $sanitized;
|
||||
}
|
||||
|
||||
/**
|
||||
* Strictly sanitizes the analysis options (booleans).
|
||||
*
|
||||
|
|
@ -3037,18 +3011,6 @@ function wpvulnerability_admin_init() {
|
|||
)
|
||||
);
|
||||
|
||||
// Register messages.
|
||||
register_setting(
|
||||
'admin_wpvulnerability_settings',
|
||||
'wpvulnerability-messages',
|
||||
array(
|
||||
'sanitize_callback' => 'wpvulnerability_sanitize_messages',
|
||||
'default' => array(),
|
||||
'show_in_rest' => false,
|
||||
'type' => 'array',
|
||||
)
|
||||
);
|
||||
|
||||
// Add a section to the settings page.
|
||||
add_settings_section(
|
||||
'admin_wpvulnerability_settings',
|
||||
|
|
|
|||
Loading…
Reference in a new issue