C:\xampp\htdocs\landing\wp-content\plugins\better-wp-security\core\modules\backup\privacy.php


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
<?php

final class ITSEC_Backup_Privacy {
    private 
$settings;

    public function 
__construct() {
        
$this->settings ITSEC_Modules::get_settings'backup' );

        
add_filter'itsec_get_privacy_policy_for_retention', array( $this'get_privacy_policy_for_retention' ) );
        
add_filter'itsec_get_privacy_policy_for_sending', array( $this'get_privacy_policy_for_sending' ) );
    }

    public function 
get_privacy_policy_for_retention$policy ) {
        
$suggested_text '<strong class="privacy-policy-tutorial">' __'Suggested text:' ) . ' </strong>';

        if ( 
$this->settings['enabled'] ) {
            if ( 
!== $this->settings['method'] ) {
                
$retention_days $this->settings['interval'] * $this->settings['retain'];

                if ( 
$retention_days ) {
                    
/* Translators: 1: Number of days that backups are retained for */
                    
$policy .= "<p>$suggested_text " sprintfesc_html__'Backups of security log details are retained for %1$d days.''better-wp-security' ), $retention_days ) . "</p>\n";
                } else {
                    
$policy .= "<p class=\"privacy-policy-tutorial\">" esc_html__'Due to current settings, backups of security log details are retained indefinitely. If this is an issue for your site\'s compliance, you should change the settings in the Database Backups section of Security > Settings.''better-wp-security' ) . "</p>\n";
                }
            }

            if ( 
!== $this->settings['method'] ) {
                
$policy .= "<p class=\"privacy-policy-tutorial\">" esc_html__'Database backups are sent via email. You may need to note what the retention policy is of those emails.''better-wp-security' ) . "</p>\n";
            }

            
$policy .= "<p class=\"privacy-policy-tutorial\">" esc_html__'Note that you may be required by some regulations to ensure that past personal data erasure requests are respected even in the event of restoring a backup of the site. You may need to set up an internal policy to ensure that previous personal data erasure requests are respected after restoring a database backup.''better-wp-security' ) . "</p>\n";
        }

        return 
$policy;
    }

    public function 
get_privacy_policy_for_sending$policy ) {
        if ( 
$this->settings['enabled'] && !== $this->settings['method'] ) {
            
$policy .= "<p class=\"privacy-policy-tutorial\">" esc_html__'Database backups are sent via email. Depending on who hosts your email and your site\'s compliance needs, you may need to note that this information is sent to that host and link to their privacy policy.''better-wp-security' ) . "</p>\n";
        }

        return 
$policy;
    }
}
new 
ITSEC_Backup_Privacy();
x

Windows NT KPTV 6.2 build 9200 (Windows Server 2012 Datacenter Edition) i586