C:\xampp\htdocs\landing\wp-content\plugins\better-wp-security\core\modules\global\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
<?php

final class ITSEC_Global_Privacy {
    private 
$settings;

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

        
add_filter'itsec_get_privacy_policy_for_security_logs', array( $this'get_privacy_policy_for_security_logs' ) );
        
add_filter'itsec_get_privacy_policy_for_retention', array( $this'get_privacy_policy_for_retention' ) );
    }

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

        
$retention_days $this->get_retention_days();

        
/* Translators: 1: Number of days that data is retained for */
        
$policy .= "<p>$suggested_text " sprintfesc_html__'The IP address of visitors, user ID of logged in users, and username of login attempts are conditionally logged to check for malicious activity and to protect the site from specific kinds of attacks. Examples of conditions when logging occurs include login attempts, log out requests, requests for suspicious URLs, changes to site content, and password updates. This information is retained for %1$d days.''better-wp-security' ), $retention_days ) . "</p>\n";

        return 
$policy;
    }

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

        
$retention_days $this->get_retention_days();

        
/* Translators: 1: Number of days that data is retained for */
        
$policy .= "<p>$suggested_text " sprintfesc_html__'Security logs are retained for %1$d days.''better-wp-security' ), $retention_days ) . "</p>\n";

        return 
$policy;
    }

    private function 
get_retention_days() {
        if ( 
'database' === $this->settings['log_type'] ) {
            return 
$this->settings['log_rotation'];
        } else if ( 
'file' === $this->settings['log_type'] ) {
            return 
$this->settings['file_log_rotation'];
        } else {
            return 
max$this->settings['log_rotation'], $this->settings['file_log_rotation'] );
        }
    }
}
new 
ITSEC_Global_Privacy();
x

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