' . esc_html__( 'This site uses 007AJ Security Scanner & Firewall to protect against unwanted logins and malicious requests. Depending on which of its features the site owner has turned on, it stores the following on this server:', '007aj-security-scanner-firewall' ) . '
' . esc_html__( 'This information is used only to protect the site. The plugin does not send it to 007AJ or any other third party. When an administrator runs an integrity scan, the site asks WordPress.org (api.wordpress.org) for the official file checksums of its WordPress version; only the version number and language are sent.', '007aj-security-scanner-firewall' ) . '
'; wp_add_privacy_policy_content( __( '007AJ Security Scanner & Firewall', '007aj-security-scanner-firewall' ), wp_kses_post( $content ) ); } /** * Register the exporter. * * @param array $exporters Exporters. * @return array */ public static function register_exporter( $exporters ) { $exporters['007aj-security-scanner-firewall'] = array( 'exporter_friendly_name' => __( '007AJ Security Scanner & Firewall', '007aj-security-scanner-firewall' ), 'callback' => array( __CLASS__, 'export' ), ); return $exporters; } /** * Register the eraser. * * @param array $erasers Erasers. * @return array */ public static function register_eraser( $erasers ) { $erasers['007aj-security-scanner-firewall'] = array( 'eraser_friendly_name' => __( '007AJ Security Scanner & Firewall', '007aj-security-scanner-firewall' ), 'callback' => array( __CLASS__, 'erase' ), ); return $erasers; } /** * Export activity log rows that belong to the person (matched by user ID, username or email). * * @param string $email_address Email address. * @param int $page Page number. * @return array */ public static function export( $email_address, $page = 1 ) { $per_page = 100; $items = array(); $labels = Log::event_labels(); foreach ( Log::rows_for_person( (string) $email_address, $per_page, max( 1, (int) $page ) ) as $row ) { $items[] = array( 'group_id' => 'ajsec-activity-log', 'group_label' => __( 'Security activity log', '007aj-security-scanner-firewall' ), 'item_id' => 'ajsec-log-' . (int) $row['id'], 'data' => array( array( 'name' => __( 'Time (UTC)', '007aj-security-scanner-firewall' ), 'value' => $row['created_at'], ), array( 'name' => __( 'Event', '007aj-security-scanner-firewall' ), 'value' => isset( $labels[ $row['event'] ] ) ? $labels[ $row['event'] ] : $row['event'], ), array( 'name' => __( 'Username', '007aj-security-scanner-firewall' ), 'value' => $row['username'], ), array( 'name' => __( 'IP address', '007aj-security-scanner-firewall' ), 'value' => $row['ip'], ), array( 'name' => __( 'Detail', '007aj-security-scanner-firewall' ), 'value' => $row['detail'], ), ), ); } return array( 'data' => $items, 'done' => count( $items ) < $per_page, ); } /** * Erase activity log rows that belong to the person. * * @param string $email_address Email address. * @param int $page Page number. * @return array */ public static function erase( $email_address, $page = 1 ) { unset( $page ); $removed = Log::delete_for_person( (string) $email_address ); return array( 'items_removed' => $removed > 0, 'items_retained' => false, 'messages' => array(), 'done' => true, ); } }