|
Server IP : 10.106.20.8 / Your IP : 216.73.216.148 Web Server : Apache System : Linux webm008.cluster106.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64 User : sixiemesrc ( 611999) PHP Version : 8.0.30 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home/s/../sixiemesrc/new/wp-content/plugins/complianz-gdpr/placeholders/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?php
defined( 'ABSPATH' ) or die();
class cmplz_placeholders {
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;
add_filter( "cmplz_do_action", array( $this, 'load_placeholders' ), 10, 3 );
}
static function this() {
return self::$_this;
}
/**
* Add some placeholder data
* @return array
*/
public function load_placeholders( $data, $action, $request ) {
if (!cmplz_user_can_manage() ) {
return $data;
}
if ( $action === 'get_processing_agreements' ) {
$documents = [];
$services = [
0 => 'Spotify',
1 => 'Google Analytics',
2 => 'Facebook',
3 => 'X (Formerly Twitter)',
4 => 'LinkedIn',
5 => 'YouTube',
6 => 'Instagram',
7 => 'Pinterest',
8 => 'Vimeo',
9 => 'Soundcloud',
];
for ( $i = 0; $i < 10; $i++ ) {
$region = COMPLIANZ::$company->get_default_region();
$documents[] = [
'id' =>$i,
'title' =>$services[$i],
'region' => $region,
'service' => $services[$i],
'date' => date_i18n( get_option( 'date_format' )),
'edit_url' => '#',
'download_url' => '#',
];
}
$regions = cmplz_get_regions(false, 'full');
$data = [
'documents' =>$documents,
'regions' => $regions,
];
}
if ( $action==='get_databreach_reports' ){
$documents = [];
for ( $i = 0; $i < 2; $i++ ) {
$region = COMPLIANZ::$company->get_default_region();
$documents[] = [
'id' =>$i,
'title' => __("Report for:","complianz-gdpr").' '.date_i18n( get_option( 'date_format' )),
'region' => $region,
'date' => date_i18n( get_option( 'date_format' )),
'edit_url' => '#',
'download_url' => '#',
];
}
$regions = cmplz_get_regions(false, 'full');
$data = [
'documents' =>$documents,
'regions' => $regions,
];
}
return $data;
}
}
$placeholders = new cmplz_placeholders();