/
home
/
techb158
/
l2hypotheques.com
/
wp-content
/
plugins
/
complianz-gdpr
/
/home/techb158/l2hypotheques.com/wp-content/plugins/complianz-gdpr
mkdir
upload
Name
Size
Mode
Actions
assets/
-
0755
rm
config/
-
0755
rm
cookie/
-
0755
rm
cookiebanner/
-
0755
rm
cron/
-
0755
rm
DNSMPD/
-
0755
rm
documents/
-
0755
rm
gutenberg/
-
0755
rm
integrations/
-
0755
rm
languages/
-
0755
rm
mailer/
-
0755
rm
onboarding/
-
0755
rm
placeholders/
-
0755
rm
progress/
-
0755
rm
proof-of-consent/
-
0755
rm
rest-api/
-
0755
rm
settings/
-
0755
rm
templates/
-
0755
rm
upgrade/
-
0755
rm
websitescan/
-
0755
rm
class-admin.php
17719
0644
edit
dl
rm
class-company.php
3590
0644
edit
dl
rm
class-cookie-blocker.php
34033
0644
edit
dl
rm
class-document.php
93103
0644
edit
dl
rm
class-export.php
1524
0644
edit
dl
rm
class-field.php
120076
0644
edit
dl
rm
class-installer.php
4070
0644
edit
dl
rm
class-review.php
5696
0644
edit
dl
rm
class-wizard.php
37986
0644
edit
dl
rm
complianz-gpdr.php
14748
0644
edit
dl
rm
composer.json
712
0644
edit
dl
rm
functions-legacy.php
175
0644
edit
dl
rm
functions.php
81718
0644
edit
dl
rm
gulpfile.js
4461
0644
edit
dl
rm
index.php
28
0644
edit
dl
rm
LICENSE.txt
18416
0644
edit
dl
rm
loco.xml
374
0644
edit
dl
rm
README.md
2221
0644
edit
dl
rm
readme.txt
31455
0644
edit
dl
rm
security.md
686
0644
edit
dl
rm
system-status.php
4865
0644
edit
dl
rm
uninstall.php
7131
0644
edit
dl
rm
upgrade.php
35728
0644
edit
dl
rm
Edit:
/home/techb158/l2hypotheques.com/wp-content/plugins/complianz-gdpr/class-company.php
(3590B)
<?php defined( 'ABSPATH' ) or die( "you do not have access to this page!" ); if ( ! class_exists( "cmplz_company" ) ) { class cmplz_company { private static $_this; function __construct() { if ( isset( self::$_this ) ) { wp_die( sprintf( '%s is a singleton class and you cannot create a second instance.', get_class( $this ) ) ); } self::$_this = $this; } static function this() { return self::$_this; } /** * Get the default region based on region settings * - if we have one region selected, return this * - if we have more than one, try to get the one this company is based in * - if nothing found, return company region * * @return string region */ public function get_default_region() { //check default region $company_region_code = $this->get_company_region_code(); $regions = cmplz_get_regions(); $region = false; if ( is_array( $regions ) ) { $multiple_regions = count( $regions ) > 1; foreach ( $regions as $region_code ) { //if we have one region, just return the first result if ( ! $multiple_regions ) { return $region_code; } //if we have several regions, get the one this company is located in if ( $company_region_code === $region_code ) { $region = $region_code; } } } //fallback one: company location if ( ! $region && is_array( $regions ) ) { reset( $regions ); $region = key( $regions ); } //fallback two: company location if ( ! $region && ! empty( $company_region_code ) ) { $region = $company_region_code; } //fallback if no array was returned. if ( ! $region ) { $region = CMPLZ_DEFAULT_REGION; } return $region; } /** * Get the default consenttype based on region settings * * @return string consenttype */ public function get_default_consenttype() { //check default region $region = $this->get_default_region(); $selected_regions = cmplz_get_regions(); if (!empty($selected_regions) && !in_array( $region, $selected_regions, true )) { //get the first value in the array if it exists $region = $selected_regions[0] ?? 'eu'; } return apply_filters('cmplz_default_consenttype', cmplz_get_consenttype_for_region( $region )); } /** * Get the company region code. The EU is a region, as is the US * * @return string region_code * * */ public function get_company_region_code() { $country_code = cmplz_get_option( 'country_company' ); $countries = COMPLIANZ::$config->countries; if ( !isset($countries[$country_code]) ) { $country_code = 'US'; } $region = cmplz_get_region_for_country( $country_code ); if ( $region ) { return $region; } return CMPLZ_DEFAULT_REGION; } /** * Check if data was sold in the past 12 months * * @return bool */ public function sold_data_12months() { if ( ! cmplz_sells_personal_data() ) { return false; } $cats = cmplz_get_option( 'data_sold_us' ); if ( ! empty( $cats ) ) { foreach ( $cats as $cat => $value ) { if ( $value == 1 ) { return true; } } } return false; } /** * Check if data has been disclosed in the past 12 months * * @return bool * */ public function disclosed_data_12months() { $cats = cmplz_get_option( 'data_disclosed_us' ); if ( ! empty( $cats ) ) { foreach ( $cats as $cat => $value ) { if ( $value == 1 ) { return true; } } } return false; } } } //class closure
Save
cmd:
run