-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy patheea-wpuser-integration.php
79 lines (68 loc) · 2.54 KB
/
eea-wpuser-integration.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
70
71
72
73
74
75
76
77
78
79
<?php
/*
Plugin Name: Event Espresso - WordPress User Integration
Plugin URI: https://www.eventespresso.com
Description: Integrates Event Espresso with WordPress Users.
Version: 2.1.4.rc.000
Author: Event Espresso
Author URI: https://www.eventespresso.com
License: GPLv2
TextDomain: event_espresso
Copyright (c) 2008-2014 Event Espresso All Rights Reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/**
* EE WPUsers add-on for Event Espresso
*
* @since 1.0.0
* @package EE WPUsers
*
*/
define('EE_WPUSERS_VERSION', '2.1.4.rc.000');
define('EE_WPUSERS_MIN_CORE_VERSION_REQUIRED', '4.11.0.rc.001');
define('EE_WPUSERS_PLUGIN_FILE', __FILE__);
function load_ee_core_wpusers()
{
static $loaded = false;
if (
! $loaded
&& class_exists('EE_Addon')
&& class_exists('EventEspresso\core\domain\DomainBase')
) {
$loaded = true;
define('EE_WPUSERS_PATH', plugin_dir_path(__FILE__));
define('EE_WPUSERS_URL', plugin_dir_url(__FILE__));
define('EE_WPUSERS_TEMPLATE_PATH', EE_WPUSERS_PATH . 'templates/');
define('EE_WPUSERS_BASENAME', plugin_basename(EE_WPUSERS_PLUGIN_FILE));
EE_Psr4AutoloaderInit::psr4_loader()->addNamespace('EventEspresso\WpUser', __DIR__);
require_once EE_WPUSERS_PATH . 'EE_WPUsers.class.php';
EE_WPUsers::register_addon();
}
}
add_action('AHEE__EE_System__load_espresso_addons', 'load_ee_core_wpusers');
/**
* @returns EventEspresso\core\domain\DomainInterface
*/
function getWpUserDomain()
{
static $domain;
if (! $domain instanceof EventEspresso\WpUser\domain\Domain) {
$domain = EventEspresso\core\domain\DomainFactory::getShared(
new EventEspresso\core\domain\values\FullyQualifiedName(
'EventEspresso\WpUser\domain\Domain'
),
[EE_WPUSERS_PLUGIN_FILE, EE_WPUSERS_VERSION]
);
}
return $domain;
}