-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathUploadCheckerFiles.js
More file actions
48 lines (46 loc) · 1.77 KB
/
Copy pathUploadCheckerFiles.js
File metadata and controls
48 lines (46 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import React from 'react';
import useSettingsDependencies from '../../../../hooks/useSettingsDependencies';
const {__} = wp.i18n;
export default function UploadCheckerFiles(props) {
const {id, name, value, onSettingChange} = props;
const handleSettingsDependencies = useSettingsDependencies();
return (
<>
<input
type="checkbox"
id={'spbc_setting_' + id}
name={name}
value="1"
checked={value === 1 || value === '1' || value === true}
className="spbc_setting_field"
onChange={(e) => {
const next = e.target.checked ? 1 : 0;
onSettingChange?.(id, next);
handleSettingsDependencies(
'upload_checker__do_check_wordpress_modules'
)(e);
}}
/>
<label
htmlFor={'spbc_setting_' + id}
className="spbc_setting-field_title--field"
>
<span>
{__('Run the Upload Checker module for uploaded files', 'security-malware-firewall')}
</span>
</label>
<i
data-setting={id}
className="spbc_long_description__show spbc-icon-help-circled"
></i>
<div className="spbc_settings_description">
<span>
{__(
'The plugin will scan files uploaded to the WordPress media library for known malicious code with heuristic and signature analysis. If malware found, upload will stop.',
'security-malware-firewall',
)}
</span>
</div>
</>
);
}