PluginProbe
GDPRess | Eliminate external requests to increase GDPR compliance / 1.2.0
GDPRess | Eliminate external requests to increase GDPR compliance v1.2.0
trunk 1.0.2 1.1.0 1.2.0 1.2.1 1.2.2 1.2.3 1.3.0 1.3.1
gdpr-press / gdpr-press.php

gdpr-press.php in GDPRess | Eliminate external requests to increase GDPR compliance 1.2.0, at gdpr-press.php

63 lines 1.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 defined('ABSPATH') || exit;
3 /**
4 * Plugin Name: GDPRess
5 * Plugin URI: https://wordpress.org/plugins/gdpr-press/
6 * Description: Easily eliminate external requests with GDPRess.
7 * Version: 1.2.0
8 * Author: Daan from FFW.Press
9 * Author URI: https://ffw.press
10 * License: GPL2v2 or later
11 * Text Domain: gdpr-press
12 */
13
14 define('GDPRESS_PLUGIN_DIR', plugin_dir_path(__FILE__));
15 define('GDPRESS_PLUGIN_FILE', __FILE__);
16 define('GDPRESS_PLUGIN_BASENAME', plugin_basename(GDPRESS_PLUGIN_FILE));
17 define('GDPRESS_STATIC_VERSION', '1.2.0');
18 define('GDPRESS_DB_VERSION', '1.0.2');
19
20 /**
21 * Takes care of loading classes on demand.
22 *
23 * @param $class
24 *
25 * @return mixed|void
26 */
27 function gdpress_autoload($class)
28 {
29 $path = explode('_', $class);
30
31 if ($path[0] != 'Gdpress') {
32 return;
33 }
34
35 if (!class_exists('FFWP_Autoloader')) {
36 require_once(GDPRESS_PLUGIN_DIR . 'ffwp-autoload.php');
37 }
38
39 $autoload = new FFWP_Autoloader($class);
40
41 return include GDPRESS_PLUGIN_DIR . 'includes/' . $autoload->load();
42 }
43
44 spl_autoload_register('gdpress_autoload');
45
46 /**
47 * All systems GO!!!
48 *
49 * @return Gdpress
50 */
51 function gdpr_press_init()
52 {
53 static $gdpress = null;
54
55 if ($gdpress === null) {
56 $gdpress = new Gdpress();
57 }
58
59 return $gdpress;
60 }
61
62 gdpr_press_init();
63