1
|
|
|
<?php defined('ABSPATH') || exit('No direct script access allowed'); |
2
|
|
|
/* |
3
|
|
|
Plugin Name: Event Espresso |
4
|
|
|
Plugin URI: http://eventespresso.com/pricing/?ee_ver=ee4&utm_source=ee4_plugin_admin&utm_medium=link&utm_campaign=wordpress_plugins_page&utm_content=support_link |
5
|
|
|
Description: Manage events, sell tickets, and receive payments from your WordPress website. Reduce event administration time, cut-out ticketing fees, and own your customer data. | <a href="https://eventespresso.com/add-ons/?utm_source=plugin_activation_screen&utm_medium=link&utm_campaign=plugin_description">Extensions</a> | <a href="https://eventespresso.com/pricing/?utm_source=plugin_activation_screen&utm_medium=link&utm_campaign=plugin_description">Sales</a> | <a href="admin.php?page=espresso_support">Support</a> |
6
|
|
|
Version: 4.9.59.rc.014 |
7
|
|
|
Author: Event Espresso |
8
|
|
|
Author URI: http://eventespresso.com/?ee_ver=ee4&utm_source=ee4_plugin_admin&utm_medium=link&utm_campaign=wordpress_plugins_page&utm_content=support_link |
9
|
|
|
License: GPLv2 |
10
|
|
|
Text Domain: event_espresso |
11
|
|
|
GitHub Plugin URI: https://github.com/eventespresso/event-espresso-core |
12
|
|
|
Copyright (c) 2008-2017 Event Espresso All Rights Reserved. |
13
|
|
|
|
14
|
|
|
This program is free software; you can redistribute it and/or modify |
15
|
|
|
it under the terms of the GNU General Public License as published by |
16
|
|
|
the Free Software Foundation; either version 2 of the License, or |
17
|
|
|
(at your option) any later version. |
18
|
|
|
|
19
|
|
|
This program is distributed in the hope that it will be useful, |
20
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
21
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
22
|
|
|
GNU General Public License for more details. |
23
|
|
|
|
24
|
|
|
You should have received a copy of the GNU General Public License |
25
|
|
|
along with this program; if not, write to the Free Software |
26
|
|
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
27
|
|
|
*/ |
28
|
|
|
/** |
29
|
|
|
* Event Espresso |
30
|
|
|
* Event Registration and Management Plugin for WordPress |
31
|
|
|
* |
32
|
|
|
* @package Event Espresso |
33
|
|
|
* @author Seth Shoultes |
34
|
|
|
* @copyright (c) 2008-2017 Event Espresso All Rights Reserved. |
35
|
|
|
* @license {@link http://eventespresso.com/support/terms-conditions/} |
36
|
|
|
* @see Plugin Licensing |
37
|
|
|
* @link {@link http://www.eventespresso.com} |
38
|
|
|
* @since 4.0 |
39
|
|
|
*/ |
40
|
|
|
if (function_exists('espresso_version')) { |
41
|
|
|
if (! function_exists('espresso_duplicate_plugin_error')) { |
42
|
|
|
/** |
43
|
|
|
* espresso_duplicate_plugin_error |
44
|
|
|
* displays if more than one version of EE is activated at the same time |
45
|
|
|
*/ |
46
|
|
|
function espresso_duplicate_plugin_error() |
47
|
|
|
{ |
48
|
|
|
?> |
49
|
|
|
<div class="error"> |
50
|
|
|
<p> |
51
|
|
|
<?php |
52
|
|
|
echo esc_html__( |
53
|
|
|
'Can not run multiple versions of Event Espresso! One version has been automatically deactivated. Please verify that you have the correct version you want still active.', |
54
|
|
|
'event_espresso' |
55
|
|
|
); ?> |
56
|
|
|
</p> |
57
|
|
|
</div> |
58
|
|
|
<?php |
59
|
|
|
espresso_deactivate_plugin(plugin_basename(__FILE__)); |
60
|
|
|
} |
61
|
|
|
} |
62
|
|
|
add_action('admin_notices', 'espresso_duplicate_plugin_error', 1); |
63
|
|
|
|
64
|
|
|
} else { |
65
|
|
|
define('EE_MIN_PHP_VER_REQUIRED', '5.3.9'); |
66
|
|
|
if (! version_compare(PHP_VERSION, EE_MIN_PHP_VER_REQUIRED, '>=')) { |
67
|
|
|
/** |
68
|
|
|
* espresso_minimum_php_version_error |
69
|
|
|
* @return void |
70
|
|
|
*/ |
71
|
|
|
function espresso_minimum_php_version_error() |
72
|
|
|
{ |
73
|
|
|
?> |
74
|
|
|
<div class="error"> |
75
|
|
|
<p> |
76
|
|
|
<?php |
77
|
|
|
printf( |
78
|
|
|
esc_html__( |
79
|
|
|
'We\'re sorry, but Event Espresso requires PHP version %1$s or greater in order to operate. You are currently running version %2$s.%3$sIn order to update your version of PHP, you will need to contact your current hosting provider.%3$sFor information on stable PHP versions, please go to %4$s.', |
80
|
|
|
'event_espresso' |
81
|
|
|
), |
82
|
|
|
EE_MIN_PHP_VER_REQUIRED, |
83
|
|
|
PHP_VERSION, |
84
|
|
|
'<br/>', |
85
|
|
|
'<a href="http://php.net/downloads.php">http://php.net/downloads.php</a>' |
86
|
|
|
); |
87
|
|
|
?> |
88
|
|
|
</p> |
89
|
|
|
</div> |
90
|
|
|
<?php |
91
|
|
|
espresso_deactivate_plugin(plugin_basename(__FILE__)); |
92
|
|
|
} |
93
|
|
|
|
94
|
|
|
add_action('admin_notices', 'espresso_minimum_php_version_error', 1); |
95
|
|
|
} else { |
96
|
|
|
define('EVENT_ESPRESSO_MAIN_FILE', __FILE__); |
97
|
|
|
/** |
98
|
|
|
* espresso_version |
99
|
|
|
* Returns the plugin version |
100
|
|
|
* |
101
|
|
|
* @return string |
102
|
|
|
*/ |
103
|
|
|
function espresso_version() |
104
|
|
|
{ |
105
|
|
|
return apply_filters('FHEE__espresso__espresso_version', '4.9.59.rc.014'); |
106
|
|
|
} |
107
|
|
|
|
108
|
|
|
/** |
109
|
|
|
* espresso_plugin_activation |
110
|
|
|
* adds a wp-option to indicate that EE has been activated via the WP admin plugins page |
111
|
|
|
*/ |
112
|
|
|
function espresso_plugin_activation() |
113
|
|
|
{ |
114
|
|
|
update_option('ee_espresso_activation', true); |
115
|
|
|
} |
116
|
|
|
|
117
|
|
|
register_activation_hook(EVENT_ESPRESSO_MAIN_FILE, 'espresso_plugin_activation'); |
118
|
|
|
|
119
|
|
|
require_once __DIR__ . '/core/bootstrap_espresso.php'; |
120
|
|
|
bootstrap_espresso(); |
121
|
|
|
} |
122
|
|
|
} |
123
|
|
|
if (! function_exists('espresso_deactivate_plugin')) { |
124
|
|
|
/** |
125
|
|
|
* deactivate_plugin |
126
|
|
|
* usage: espresso_deactivate_plugin( plugin_basename( __FILE__ )); |
127
|
|
|
* |
128
|
|
|
* @access public |
129
|
|
|
* @param string $plugin_basename - the results of plugin_basename( __FILE__ ) for the plugin's main file |
130
|
|
|
* @return void |
131
|
|
|
*/ |
132
|
|
|
function espresso_deactivate_plugin($plugin_basename = '') |
133
|
|
|
{ |
134
|
|
|
if (! function_exists('deactivate_plugins')) { |
135
|
|
|
require_once ABSPATH . 'wp-admin/includes/plugin.php'; |
136
|
|
|
} |
137
|
|
|
unset($_GET['activate'], $_REQUEST['activate']); |
138
|
|
|
deactivate_plugins($plugin_basename); |
139
|
|
|
} |
140
|
|
|
} |
141
|
|
|
|