PluginProbe
The GDPR Framework By Data443 / 1.0.4
The GDPR Framework By Data443 v1.0.4
2.5.0 2.4.0 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.3 1.0.33 1.0.34 1.0.35 1.0.36 1.0.37 1.0.39 1.0.4 1.0.40 1.0.41 1.0.42 1.0.43 1.0.44 1.0.45 1.0.46 All 41 releases
gdpr-framework / gdpr-framework.php

gdpr-framework.php in The GDPR Framework By Data443 1.0.4, at gdpr-framework.php

74 lines 2.1 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 /**
4 * Plugin Name: The GDPR Framework
5 * Plugin URI: https://codelight.eu/wordpress-gdpr-framework/
6 * Description: Tools to help make your website GDPR-compliant. Fully documented, extendable and developer-friendly.
7 * Version: 1.0.4
8 * Author: Codelight
9 * Author URI: https://codelight.eu/
10 * Text Domain: gdpr
11 * Domain Path: /languages
12 */
13
14 if (!defined('WPINC')) {
15 die;
16 }
17
18 /**
19 * Helper function for prettying up errors
20 *
21 * @param string $message
22 * @param string $subtitle
23 * @param string $title
24 */
25 $gdpr_error = function($message, $subtitle = '', $title = '') {
26 $title = $title ?: _x('WordPress GDPR &rsaquo; Error', '(Admin)', 'gdpr-framework');
27 $message = "<h1>{$title}<br><small>{$subtitle}</small></h1><p>{$message}</p>";
28 wp_die($message, $title);
29 };
30
31 /**
32 * Ensure compatible version of PHP is used
33 */
34 if (version_compare(phpversion(), '5.6.33', '<')) {
35 $gdpr_error(
36 _x('You must be using PHP 5.6.33 or greater.', '(Admin)', 'gdpr-framework'),
37 _x('Invalid PHP version', '(Admin)', 'gdpr-framework')
38 );
39 }
40
41 /**
42 * Ensure compatible version of WordPress is used
43 */
44 if (version_compare(get_bloginfo('version'), '4.3', '<')) {
45 $gdpr_error(
46 _x('You must be using WordPress 4.3.0 or greater.', '(Admin)', 'gdpr-framework'),
47 _x('Invalid WordPress version', '(Admin)', 'gdpr-framework')
48 );
49 }
50
51 /**
52 * Load dependencies
53 */
54 if (!class_exists('\Codelight\GDPR\Container')) {
55
56 if (!file_exists($composer = __DIR__ . '/vendor/autoload.php')) {
57 $gdpr_error(
58 _x(
59 'You appear to be running a development version of GDPR. You must run <code>composer install</code> from the plugin directory.',
60 '(Admin)',
61 'gdpr-framework'
62 ),
63 _x(
64 'Autoloader not found.',
65 '(Admin)',
66 'gdpr-framework'
67 )
68 );
69 }
70 require_once $composer;
71 }
72
73 require_once('bootstrap.php');
74