2014-12-15 22:38:07 +02:00
< ? 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 );
2015-03-07 13:07:49 +02:00
add_action ( 'init' , array ( & $this , 'load_addons' ) );
2014-12-15 22:38:07 +02:00
$this -> honeypot = 'request' ;
2014-12-21 17:47:37 +02:00
2015-02-04 20:31:39 +02:00
$this -> available_languages = array (
'en_US' => 'English (US)' ,
2015-02-08 17:27:04 +02:00
'es_ES' => 'Español' ,
2015-02-04 20:31:39 +02:00
'fr_FR' => 'Français' ,
2015-02-08 17:27:04 +02:00
'it_IT' => 'Italiano' ,
2015-02-07 01:39:29 +02:00
'de_DE' => 'Deutsch' ,
2015-02-15 20:31:41 +02:00
'nl_NL' => 'Nederlands' ,
2015-02-21 01:39:02 +02:00
'fi_FI' => 'Suomi' ,
'pl_PL' => 'Polski' ,
2015-02-04 20:31:39 +02:00
'tr_TR' => 'Türkçe' ,
);
2015-03-07 13:07:49 +02:00
$this -> addons [ 'bp_avatar_transfer' ] = array ( __ ( 'BuddyPress Avatar Transfer' , 'ultimatemember' ), __ ( 'This tool enables you to migrate your custom user photos from BuddyPress to use with Ultimate Member.' , 'ultimatemember' ) );
}
/***
*** @Load add-ons
***/
function load_addons () {
global $ultimatemember ;
if ( ! is_admin () ) return ;
foreach ( $ultimatemember -> addons as $addon => $name ) {
if ( um_get_option ( 'addon_' . $addon ) == 1 )
include_once um_path . 'addons/' . $addon . '.php' ;
}
2014-12-15 22:38:07 +02:00
}
/***
*** @Init
***/
function init (){
ob_start ();
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' ;
2014-12-22 01:45:24 +02:00
require_once um_path . 'core/um-password.php' ;
2014-12-15 22:38:07 +02:00
require_once um_path . 'core/um-fields.php' ;
require_once um_path . 'core/um-form.php' ;
require_once um_path . 'core/um-user.php' ;
2015-02-01 01:30:04 +02:00
require_once um_path . 'core/um-user-posts.php' ;
2014-12-29 15:51:55 +02:00
require_once um_path . 'core/um-profile.php' ;
2014-12-15 22:38:07 +02:00
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' ;
2014-12-29 15:51:55 +02:00
require_once um_path . 'core/um-menu.php' ;
2014-12-15 22:38:07 +02:00
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' ;
2015-01-03 23:18:27 +02:00
require_once um_path . 'core/um-cron.php' ;
2015-01-14 00:16:44 +02:00
require_once um_path . 'core/um-cache.php' ;
2015-03-07 13:07:49 +02:00
require_once um_path . 'core/um-tracking.php' ;
2014-12-15 22:38:07 +02:00
2014-12-29 15:51:55 +02:00
require_once um_path . 'core/lib/mobiledetect/Mobile_Detect.php' ;
2014-12-15 22:38:07 +02:00
require_once um_path . 'core/um-actions-form.php' ;
2015-01-07 08:37:25 +02:00
require_once um_path . 'core/um-actions-access.php' ;
2014-12-15 22:38:07 +02:00
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' ;
2014-12-22 01:45:24 +02:00
require_once um_path . 'core/um-actions-password.php' ;
2014-12-15 22:38:07 +02:00
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-tracking.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' ;
2014-12-22 23:34:05 +02:00
require_once um_path . 'core/um-actions-misc.php' ;
2015-02-01 01:30:04 +02:00
require_once um_path . 'core/um-actions-posts.php' ;
2014-12-15 22:38:07 +02:00
require_once um_path . 'core/um-filters-login.php' ;
require_once um_path . 'core/um-filters-register.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' ;
2015-02-01 01:30:04 +02:00
require_once um_path . 'core/um-filters-misc.php' ;
2015-03-07 13:07:49 +02:00
require_once um_path . 'core/um-filters-addons.php' ;
2015-03-10 14:27:56 +02:00
require_once um_path . 'core/um-filters-commenting.php' ;
2014-12-15 22:38:07 +02:00
/* initialize UM */
$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 ();
2014-12-22 01:45:24 +02:00
$this -> password = new UM_Password ();
2014-12-15 22:38:07 +02:00
$this -> login = new UM_Login ();
$this -> register = new UM_Register ();
$this -> fields = new UM_Fields ();
$this -> user = new UM_User ();
2015-02-01 01:30:04 +02:00
$this -> user_posts = new UM_User_Posts ();
2014-12-29 15:51:55 +02:00
$this -> profile = new UM_Profile ();
2014-12-15 22:38:07 +02:00
$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 ();
2014-12-29 15:51:55 +02:00
$this -> menu = new UM_Menu ();
2014-12-15 22:38:07 +02:00
$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 ();
2015-01-03 23:18:27 +02:00
$this -> cron = new UM_Cron ();
2015-01-14 00:16:44 +02:00
$this -> cache = new UM_Cache ();
2015-03-07 13:07:49 +02:00
$this -> tracking = new UM_Tracking ();
2015-01-03 23:18:27 +02:00
2014-12-29 15:51:55 +02:00
$this -> mobile = new Mobile_Detect ;
2014-12-20 18:02:41 +02:00
$this -> options = get_option ( 'um_options' );
2014-12-15 22:38:07 +02:00
2015-02-04 20:31:39 +02:00
$domain = 'ultimatemember' ;
$locale = get_option ( 'WPLANG' );
load_textdomain ( $domain , WP_LANG_DIR . '/plugins/' . $domain . '-' . $locale . '.mo' );
2014-12-15 22:38:07 +02:00
}
}
$ultimatemember = new UM_API ();