2024-02-21 21:31:00 +01:00
|
|
|
<?php
|
2024-05-27 16:59:30 +02:00
|
|
|
|
|
|
|
use Bdp\Modules\EventParticipants\Controllers\MemberSummaryController;
|
|
|
|
use Bdp\Modules\EventParticipants\Controllers\PrintParticipantListPdfController;
|
|
|
|
use Bdp\Modules\EventParticipants\Controllers\RegisterMemberController;
|
2024-02-26 14:47:51 +01:00
|
|
|
use Bdp\Modules\LimitLoginAttempts\Controllers\LoginHandler;
|
2024-03-23 00:37:20 +01:00
|
|
|
use Bdp\Libs\DatabaseHandler;
|
|
|
|
|
2024-02-26 14:47:51 +01:00
|
|
|
|
2024-02-21 21:31:00 +01:00
|
|
|
require_once dirname(__FILE__) . '/pre_requires.php';
|
|
|
|
require_once dirname(__FILE__) . '/environment.php';
|
2024-05-27 16:59:30 +02:00
|
|
|
|
|
|
|
require_once (BDP_LV_PLUGIN_DIR . '/lib/dompdf/autoload.php');
|
|
|
|
require_once dirname(__FILE__) . '/pdfhandler.php';
|
|
|
|
|
|
|
|
require_once (BDP_LV_PLUGIN_DIR . '/includes/class-modelcommon.php');
|
|
|
|
|
2024-02-26 14:47:51 +01:00
|
|
|
require_once dirname(__FILE__) . '/spl.php';
|
2024-02-21 21:31:00 +01:00
|
|
|
require_once dirname(__FILE__) . '/update.class.php';
|
|
|
|
|
|
|
|
require_once BDP_LV_PLUGIN_DIR . 'includes/FileAccess.class.php';
|
|
|
|
require_once BDP_LV_PLUGIN_DIR . 'includes/WpConfigEditor.class.php';
|
2024-03-23 00:37:20 +01:00
|
|
|
require_once BDP_LV_PLUGIN_DIR . 'includes/DatabaseHandler.php';
|
2024-03-16 16:35:18 +01:00
|
|
|
require_once (BDP_LV_PLUGIN_DIR . '/includes/roles.php');
|
2024-02-21 21:31:00 +01:00
|
|
|
|
2024-05-27 16:59:30 +02:00
|
|
|
|
|
|
|
|
2024-02-21 21:31:00 +01:00
|
|
|
require_once (BDP_LV_PLUGIN_DIR . '/includes/filters.php');
|
2024-03-16 16:35:18 +01:00
|
|
|
|
2024-02-21 21:31:00 +01:00
|
|
|
require_once (BDP_LV_PLUGIN_DIR . '/lib/ics-parser/Event.php');
|
|
|
|
require_once (BDP_LV_PLUGIN_DIR . '/lib/ics-parser/ICal.php');
|
2024-03-16 14:21:57 +01:00
|
|
|
|
2024-02-21 21:31:00 +01:00
|
|
|
require_once (BDP_LV_PLUGIN_DIR . '/modules/seo/seo.php');
|
|
|
|
require_once (BDP_LV_PLUGIN_DIR . '/modules/calendar/calendar.php');
|
|
|
|
require_once (BDP_LV_PLUGIN_DIR . '/includes/frontend-functions.php');
|
|
|
|
|
2024-03-16 16:58:00 +01:00
|
|
|
require_once (BDP_LV_PLUGIN_DIR . '/modules/calendar/Views/settings-form.php');
|
2024-02-21 21:31:00 +01:00
|
|
|
require_once (BDP_LV_PLUGIN_DIR . '/modules/security/security.php');
|
|
|
|
|
2024-03-23 00:37:20 +01:00
|
|
|
|
|
|
|
$dbHandler = new DatabaseHandler();
|
2024-03-16 14:21:57 +01:00
|
|
|
function kompass_admin_init()
|
2024-02-26 14:47:51 +01:00
|
|
|
{
|
|
|
|
kompass_settings_validators();
|
|
|
|
}
|
2024-02-21 21:31:00 +01:00
|
|
|
|
|
|
|
function bdp_kompass_load_plugin_textdomain() {
|
2024-03-05 22:59:15 +01:00
|
|
|
load_textdomain( BDP_LV_PLUGIN_SLUG, BDP_LV_PLUGIN_DIR . '/lang/' . BDP_LV_PLUGIN_SLUG . '-' . get_locale() . '.mo' );
|
2024-02-21 21:31:00 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2024-03-16 16:35:18 +01:00
|
|
|
function kompass_after_setup_theme()
|
|
|
|
{
|
|
|
|
setup_site_roles();
|
|
|
|
#register_custom_theme_directory();
|
|
|
|
|
|
|
|
}
|
2024-02-21 21:31:00 +01:00
|
|
|
|
2024-05-27 16:59:30 +02:00
|
|
|
function kompass_is_fullaged(string $birthday) : bool {
|
|
|
|
$obj_birthday = \DateTime::createFromFormat('Y-m-d', $birthday);
|
|
|
|
$today = new DateTime();
|
|
|
|
$compare = date_diff($today, $obj_birthday);
|
|
|
|
return $compare->y >= 18;
|
|
|
|
}
|
|
|
|
|
|
|
|
function kompass_get_age(string $birthday) : int {
|
|
|
|
$obj_birthday = \DateTime::createFromFormat('Y-m-d', $birthday);
|
|
|
|
$today = new DateTime();
|
|
|
|
$compare = date_diff($today, $obj_birthday);
|
|
|
|
return $compare->y;
|
|
|
|
}
|
|
|
|
|
|
|
|
function kompass_load_ajax_content() {
|
|
|
|
$class = 'Bdp\\Modules\\' . $_REQUEST['module'] . '\\Controllers\\AjaxRouterController';
|
|
|
|
if (!class_exists($class)) {
|
|
|
|
wp_die('Invalid module call: Module=' . $_REQUEST['module']);
|
|
|
|
}
|
|
|
|
new $class();
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
|
2024-02-21 21:31:00 +01:00
|
|
|
|
2024-02-26 14:47:51 +01:00
|
|
|
$loginHandler = new LoginHandler();
|
2024-02-21 21:31:00 +01:00
|
|
|
new BdpVersionChecker();
|
|
|
|
#add_filter( 'plugins_api', array( $class, 'info' ), 20, 3 );
|
2024-02-26 14:47:51 +01:00
|
|
|
require_once dirname(__FILE__) . '/action_caller.php';
|