This repository has been archived by the owner on Mar 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
/
um-init.php
186 lines (161 loc) · 6.37 KB
/
um-init.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
<?php
class UM_API {
function __construct() {
require_once um_path . 'core/um-short-functions.php';
if (is_admin()){
require_once um_path . 'admin/um-admin-init.php';
}
add_action('init', array(&$this, 'init'), 0);
add_action('init', array(&$this, 'load_addons') );
$this->honeypot = 'request';
$this->available_languages = array(
'en_US' => 'English (US)',
'es_ES' => 'Español',
'es_MX' => 'Español (México)',
'fr_FR' => 'Français',
'it_IT' => 'Italiano',
'de_DE' => 'Deutsch',
'nl_NL' => 'Nederlands',
'pt_BR' => 'Português do Brasil',
'fi_FI' => 'Suomi',
'ro_RO' => 'Română',
'da_DK' => 'Dansk',
'sv_SE' => 'Svenska',
'pl_PL' => 'Polski',
'cs_CZ' => 'Czech',
'el' => 'Greek',
'ru_RU' => 'Русский',
'tr_TR' => 'Türkçe',
'fa_IR' => 'Farsi',
'he_IL' => 'Hebrew',
'ar' => 'العربية'
);
$this->addons['bp_avatar_transfer'] = array(
__( 'BuddyPress Avatar Transfer','ultimatemember' ),
__('This add-on enables you to migrate your custom user photos from BuddyPress to use with Ultimate Member.','ultimatemember')
);
}
/***
*** @Load add-ons
***/
function load_addons() {
global $ultimatemember;
foreach( $ultimatemember->addons as $addon => $name ) {
if ( um_get_option('addon_' . $addon ) == 1 ) {
include_once um_path . 'addons/'.$addon.'.php';
}
}
}
/***
*** @Init
***/
function init(){
ob_start();
require_once um_path . 'core/um-api.php';
require_once um_path . 'core/um-rewrite.php';
require_once um_path . 'core/um-setup.php';
require_once um_path . 'core/um-uninstall.php';
require_once um_path . 'core/um-fonticons.php';
require_once um_path . 'core/um-login.php';
require_once um_path . 'core/um-register.php';
require_once um_path . 'core/um-enqueue.php';
require_once um_path . 'core/um-shortcodes.php';
require_once um_path . 'core/um-account.php';
require_once um_path . 'core/um-password.php';
require_once um_path . 'core/um-fields.php';
require_once um_path . 'core/um-form.php';
require_once um_path . 'core/um-user.php';
require_once um_path . 'core/um-user-posts.php';
require_once um_path . 'core/um-profile.php';
require_once um_path . 'core/um-query.php';
require_once um_path . 'core/um-datetime.php';
require_once um_path . 'core/um-chart.php';
require_once um_path . 'core/um-builtin.php';
require_once um_path . 'core/um-files.php';
require_once um_path . 'core/um-taxonomies.php';
require_once um_path . 'core/um-validation.php';
require_once um_path . 'core/um-navmenu.php';
require_once um_path . 'core/um-menu.php';
require_once um_path . 'core/um-access.php';
require_once um_path . 'core/um-permalinks.php';
require_once um_path . 'core/um-mail.php';
require_once um_path . 'core/um-members.php';
require_once um_path . 'core/um-logout.php';
require_once um_path . 'core/um-modal.php';
require_once um_path . 'core/um-cron.php';
require_once um_path . 'core/um-tracking.php';
if ( !class_exists( 'Mobile_Detect' ) ) {
require_once um_path . 'core/lib/mobiledetect/Mobile_Detect.php';
}
require_once um_path . 'core/um-actions-form.php';
require_once um_path . 'core/um-actions-access.php';
require_once um_path . 'core/um-actions-wpadmin.php';
require_once um_path . 'core/um-actions-core.php';
require_once um_path . 'core/um-actions-ajax.php';
require_once um_path . 'core/um-actions-login.php';
require_once um_path . 'core/um-actions-register.php';
require_once um_path . 'core/um-actions-profile.php';
require_once um_path . 'core/um-actions-account.php';
require_once um_path . 'core/um-actions-password.php';
require_once um_path . 'core/um-actions-members.php';
require_once um_path . 'core/um-actions-global.php';
require_once um_path . 'core/um-actions-user.php';
require_once um_path . 'core/um-actions-save-profile.php';
require_once um_path . 'core/um-actions-modal.php';
require_once um_path . 'core/um-actions-misc.php';
require_once um_path . 'core/um-filters-login.php';
require_once um_path . 'core/um-filters-fields.php';
require_once um_path . 'core/um-filters-files.php';
require_once um_path . 'core/um-filters-navmenu.php';
require_once um_path . 'core/um-filters-avatars.php';
require_once um_path . 'core/um-filters-arguments.php';
require_once um_path . 'core/um-filters-user.php';
require_once um_path . 'core/um-filters-members.php';
require_once um_path . 'core/um-filters-profile.php';
require_once um_path . 'core/um-filters-account.php';
require_once um_path . 'core/um-filters-misc.php';
require_once um_path . 'core/um-filters-addons.php';
require_once um_path . 'core/um-filters-commenting.php';
/* initialize UM */
$this->api = new UM_REST_API();
$this->rewrite = new UM_Rewrite();
$this->setup = new UM_Setup();
$this->uninstall = new UM_Uninstall();
$this->icons = new UM_FontIcons();
$this->styles = new UM_Enqueue();
$this->shortcodes = new UM_Shortcodes();
$this->account = new UM_Account();
$this->password = new UM_Password();
$this->login = new UM_Login();
$this->register = new UM_Register();
$this->fields = new UM_Fields();
$this->user = new UM_User();
$this->user_posts = new UM_User_Posts();
$this->profile = new UM_Profile();
$this->datetime = new UM_DateTime();
$this->chart = new UM_Chart();
$this->builtin = new UM_Builtin();
$this->form = new UM_Form();
$this->files = new UM_Files();
$this->taxonomies = new UM_Taxonomies();
$this->validation = new UM_Validation();
$this->query = new UM_Query();
$this->menu = new UM_Menu();
$this->access = new UM_Access();
$this->permalinks = new UM_Permalinks();
$this->mail = new UM_Mail();
$this->members = new UM_Members();
$this->logout = new UM_Logout();
$this->modal = new UM_Modal();
$this->cron = new UM_Cron();
$this->tracking = new UM_Tracking();
$this->mobile = new Mobile_Detect;
$this->options = get_option('um_options');
$domain = 'ultimatemember';
$locale = ( get_locale() != '' ) ? get_locale() : 'en_US';
load_textdomain($domain, WP_LANG_DIR . '/plugins/' .$domain.'-'.$locale.'.mo');
if ( !get_option('show_avatars') )
update_option('show_avatars', 1 );
}
}
$ultimatemember = new UM_API();