-
Notifications
You must be signed in to change notification settings - Fork 0
/
rd-cookie-notice.php
69 lines (57 loc) · 1.85 KB
/
rd-cookie-notice.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
/**
* Plugin Name: Rundiz Cookie Notice
* Description: Rd Cookie Notice allows you to elegantly inform users that your site uses cookies and helps you comply with the EU GDPR cookie law and CCPA regulations.
* Version: 0.2.8
* Requires at least: 4.0
* Requires PHP: 7.0
* Author: Vee Winch
* Author URI: https://rundiz.com/
* License: MIT
* License URI: https://opensource.org/licenses/MIT
* Text Domain: rd-cookie-notice
* Domain Path: /languages
* Update URI: false
*
* @package rd-cookie-notice
*/
/**
* This plugin was copied from its original "Cookie Notice" by "dFactory" and then modified by "ZigPress".
*/
// exit if accessed directly
if (!defined('ABSPATH')) {
exit();
}
if (!defined('RDCNDB_VERSION')) {
define('RDCNDB_VERSION', '1.0.0');// define DB version here.
}
// register autoload namespace for this plugin only.
require 'RdCookieNotice/Autoload.php';
$Autoload = new \RdCookieNotice\Psr4AutoloaderClass();
$Autoload->register();
$Autoload->addNamespace('RdCookieNotice', __DIR__ . DIRECTORY_SEPARATOR . 'RdCookieNotice');
unset($Autoload);
require_once 'RdCookieNotice.php';
if (!defined('RDCN_PLUGINFILE')) {
define('RDCN_PLUGINFILE', __FILE__);
}
if (!defined('RDCN_VERSION')) {
$pluginData = (function_exists('get_file_data') ? get_file_data(__FILE__, ['Version' => 'Version']) : null);
$pluginVersion = (isset($pluginData['Version']) ? $pluginData['Version'] : gmdate('Ym'));
unset($pluginData);
define('RDCN_VERSION', $pluginVersion);
unset($pluginVersion);
}
/**
* Initialize Rundiz Cookie Notice.
*/
function runRdCookieNotice()
{
static $instance;
// first call to instance() initializes the plugin
if (!$instance instanceof \RdCookieNotice\RdCookieNotice) {
$instance = \RdCookieNotice\RdCookieNotice::instance();
}
return $instance;
}
$rdCookieNotice = runRdCookieNotice();