REDROOM
PHP 8.2.31
Path:
Logout
Edit File
Size: 2.50 KB
Close
/home/nshryvcy/himaltourism.com/wp-content/plugins/wpforms-lite/includes/functions/privacy.php
Text
Base64
<?php /** * Helper functions related to privacy, geolocation and user data. * * @since 1.8.0 */ /** * Get the user IP address. * * @since 1.2.5 * @since 1.7.3 Improve the IP detection quality by taking care of proxies (e.g. when the site is behind Cloudflare). * * Code based on the: * - WordPress method \WP_Community_Events::get_unsafe_client_ip * - Cloudflare documentation https://support.cloudflare.com/hc/en-us/articles/206776727 * * @return string */ function wpforms_get_ip() { $ip = '127.0.0.1'; $address_headers = [ 'HTTP_TRUE_CLIENT_IP', 'HTTP_CF_CONNECTING_IP', 'HTTP_X_REAL_IP', 'HTTP_CLIENT_IP', 'HTTP_X_FORWARDED_FOR', 'HTTP_X_FORWARDED', 'HTTP_X_CLUSTER_CLIENT_IP', 'HTTP_FORWARDED_FOR', 'HTTP_FORWARDED', 'REMOTE_ADDR', ]; foreach ( $address_headers as $header ) { if ( empty( $_SERVER[ $header ] ) ) { continue; } /* * HTTP_X_FORWARDED_FOR can contain a chain of comma-separated addresses, with or without spaces. * The first address is the original client. It can't be trusted for authenticity, * but we don't need to for this purpose. */ // phpcs:ignore WordPress.Security.ValidatedSanitizedInput.InputNotSanitized $address_chain = explode( ',', wp_unslash( $_SERVER[ $header ] ) ); $ip = filter_var( trim( $address_chain[0] ), FILTER_VALIDATE_IP ); break; } /** * Filter detected IP address. * * @since 1.2.5 * * @param string $ip IP address. */ return filter_var( apply_filters( 'wpforms_get_ip', $ip ), FILTER_VALIDATE_IP ); } /** * Determine if collecting user's IP is allowed by GDPR setting (globally or per form). * Majority of our users have GDPR disabled. * So we remove this data from the request only when it's not needed: * 1) when GDPR is enabled AND globally disabled user details storage; * 2) when GDPR is enabled AND IP address processing is disabled on per form basis. * * @since 1.6.6 * * @param array $form_data Form settings. * * @return bool */ function wpforms_is_collecting_ip_allowed( $form_data = [] ) { if ( wpforms_setting( 'gdpr', false ) && ( wpforms_setting( 'gdpr-disable-details', false ) || ( ! empty( $form_data ) && ! empty( $form_data['settings']['disable_ip'] ) ) ) ) { return false; } return true; } /** * Determine if collecting cookies is allowed by GDPR setting. * * @since 1.7.5 * * @return bool */ function wpforms_is_collecting_cookies_allowed() { return ! ( wpforms_setting( 'gdpr', false ) && wpforms_setting( 'gdpr-disable-uuid', false ) ); }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 0 × Files: 18
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
access.php
9.85 KB
lrw-r--r--
2025-01-05 05:34:51
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
checks.php
14.40 KB
lrw-r--r--
2025-01-05 05:34:51
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
colors.php
3.97 KB
lrw-r--r--
2025-01-05 05:34:51
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
data-presets.php
19.03 KB
lrw-r--r--
2025-01-05 05:34:51
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
date-time.php
3.20 KB
lrw-r--r--
2025-01-05 05:34:51
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
debug.php
5.23 KB
lrw-r--r--
2025-01-05 05:34:51
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
education.php
2.32 KB
lrw-r--r--
2025-01-05 05:34:51
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
escape-sanitize.php
11.50 KB
lrw-r--r--
2025-01-05 05:34:51
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
filesystem-media.php
6.58 KB
lrw-r--r--
2025-01-05 05:34:51
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
form-fields.php
16.01 KB
lrw-r--r--
2025-01-05 05:34:51
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
forms.php
12.81 KB
lrw-r--r--
2025-01-05 05:34:51
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
list.php
6.88 KB
lrw-r--r--
2025-01-05 05:34:51
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
payments.php
21.09 KB
lrw-r--r--
2025-01-05 05:34:51
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
plugins.php
1.59 KB
lrw-r--r--
2025-01-05 05:34:51
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
privacy.php
2.50 KB
lrw-r--r--
2025-01-05 05:34:51
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
providers.php
1.49 KB
lrw-r--r--
2025-01-05 05:34:51
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
unused.php
7.76 KB
lrw-r--r--
2025-01-05 05:34:51
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
utilities.php
7.96 KB
lrw-r--r--
2025-01-05 05:34:51
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).