2024-02-26 14:47:51 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
if (!isset($loginHandler)) {
|
|
|
|
$loginHandler = new \Bdp\Modules\LimitLoginAttempts\Controllers\LoginHandler();
|
|
|
|
}
|
|
|
|
|
|
|
|
add_action('wp_login_failed', [$loginHandler, 'onFailedLogin']);
|
|
|
|
add_filter('wp_authenticate_user', [$loginHandler, 'onSuccessFullLogin'], 99999, 2);
|
|
|
|
add_filter( 'admin_enqueue_scripts', 'enqueue_custom_password_js',10 );
|
|
|
|
|
2024-03-16 14:21:57 +01:00
|
|
|
add_action('admin_init', 'kompass_admin_init');
|
2024-02-26 14:47:51 +01:00
|
|
|
|
|
|
|
if (get_option('kompass_cookies', false)) {
|
|
|
|
$loginHandler->handleCookies();
|
|
|
|
add_action('auth_cookie_bad_username', [$loginHandler, 'checkFailedCookies']);
|
|
|
|
add_action('auth_cookie_valid', [$loginHandler, 'onValidCookie'], 10, 2);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (isset($_POST['save_kompass_balist_list_type'])) {
|
|
|
|
updateBlockOrAllowList($_POST);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2024-03-16 14:21:57 +01:00
|
|
|
|
|
|
|
add_action('wp_head', 'kompass_seo_add_verfications');
|