PluginProbe
CookieAdmin – Cookie Consent Banner / 1.0.3
CookieAdmin – Cookie Consent Banner v1.0.3
1.2.3 1.2.2 1.2.1 1.2.0 1.1.9 trunk 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.1.5 1.1.6 1.1.7 1.1.8
cookieadmin / init.php

init.php in CookieAdmin – Cookie Consent Banner 1.0.3, at init.php

50 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /*
3 * CookieAdmin
4 * https://cookieadmin.net
5 * (c) Softaculous Team
6 */
7
8 // We need the ABSPATH
9 if (!defined('ABSPATH')) exit;
10
11 define('COOKIEADMIN_BASE', plugin_basename(COOKIEADMIN_FILE));
12 define('COOKIEADMIN_DIR', plugin_dir_path(__FILE__));
13 define('COOKIEADMIN_VERSION', '1.0.3');
14 define('COOKIEADMIN_URL', plugins_url('', COOKIEADMIN_FILE));
15 define('COOKIEADMIN_PLUGIN_URL', plugin_dir_url(__FILE__));
16 define('COOKIEADMIN_PRO_URL', 'https://cookieadmin.net/pricing?from=plugin');
17 define('COOKIEADMIN_WWW_URL', 'https://cookieadmin.net/');
18
19 include_once(COOKIEADMIN_DIR.'includes/functions.php');
20
21 function cookieadmin_autoloader($class){
22
23 if(!preg_match('/^CookieAdmin\\\(.*)/is', $class, $m)){
24 return;
25 }
26
27 $m[1] = str_replace('\\', '/', $m[1]);
28
29 if(strpos($class, 'CookieAdmin\lib') === 0){
30 if(file_exists(COOKIEADMIN_DIR.$m[1].'.php')){
31 include_once(COOKIEADMIN_DIR.$m[1].'.php');
32 }
33 }
34
35 // For Pro
36 if(file_exists(COOKIEADMIN_DIR.'includes/'.strtolower($m[1]).'.php')){
37 include_once(COOKIEADMIN_DIR.'includes/'.strtolower($m[1]).'.php');
38 }
39 }
40
41 spl_autoload_register(__NAMESPACE__.'\cookieadmin_autoloader');
42
43
44 if(!class_exists('CookieAdmin')){
45 #[\AllowDynamicProperties]
46 class CookieAdmin{
47 }
48 }
49
50 add_action('plugins_loaded', 'cookieadmin_load_plugin');