id ) {
remove_all_actions('admin_notices');
remove_all_actions('all_admin_notices');
}
}
function settingsPanel() {
if ( ! current_user_can( 'manage_options' ) ) {
wp_die( esc_html__( 'Sorry, you are not allowed to access this page.', 'admin-login-url-change' ) );
}
// Check if Pro plugin is active
$is_pro = apply_filters( 'aluc_pro_active', false );
$slug = get_option( 'jh_new_login_url', '' );
$home_url = trailingslashit( home_url() );
$current_url = $slug ? $home_url . $slug . '/' : esc_html__( 'Not set yet', 'admin-login-url-change' );
// Security score: 1 point per active feature
$score = 0;
if ( $slug ) $score += 40; // custom login URL
if ( get_option('aluc_block_direct_wp_login', 0) ) $score += 20; // block wp-login direct
if ( get_option('aluc_hide_login_errors', 0) ) $score += 15; // hide login errors
if ( get_option('aluc_limit_login_attempts', 0) ) $score += 25; // PRO
$score = min( $score, 100 );
$circumference = 2 * 3.14159 * 45; // ≈ 283
?>
>
PRO
PRO
PRO
PRO
render_sidebar( $score, $circumference, $is_pro ); ?>
render_sidebar( $score, $circumference, $is_pro ); ?>
[
'label' => __( 'IP Address Blocker', 'admin-login-url-change' ),
'icon' => 'red',
'subtitle' => __( 'Block specific IP addresses from accessing your login page', 'admin-login-url-change' ),
'desc' => __( 'Block individual IPs or entire IP ranges that are attacking your site. Supports both IPv4 and IPv6.', 'admin-login-url-change' ),
'features' => [
[ 'title' => __( 'Block individual IP addresses', 'admin-login-url-change' ), 'desc' => __( 'Add single IPs to block list instantly', 'admin-login-url-change' ) ],
[ 'title' => __( 'Block entire IP ranges (CIDR)', 'admin-login-url-change' ), 'desc' => __( 'Support for both IPv4 and IPv6 CIDR ranges', 'admin-login-url-change' ) ],
[ 'title' => __( 'Import / export block lists', 'admin-login-url-change' ), 'desc' => __( 'Manage large block lists with ease', 'admin-login-url-change' ) ],
[ 'title' => __( 'Automatic IP ban after failed logins', 'admin-login-url-change' ), 'desc' => __( 'Auto-ban bots and brute-force attackers', 'admin-login-url-change' ) ],
],
],
'country-block' => [
'label' => __( 'Country Blocker', 'admin-login-url-change' ),
'icon' => 'amber',
'subtitle' => __( 'Restrict login access by country / geo-location', 'admin-login-url-change' ),
'desc' => __( 'Only allow logins from specific countries. Perfect if your team is in one location.', 'admin-login-url-change' ),
'features' => [
[ 'title' => __( 'Block countries with 1 click', 'admin-login-url-change' ), 'desc' => __( 'Simple country select UI', 'admin-login-url-change' ) ],
[ 'title' => __( 'Allowlist-only mode', 'admin-login-url-change' ), 'desc' => __( 'Only let whitelisted countries log in', 'admin-login-url-change' ) ],
[ 'title' => __( 'GeoIP database auto-updated', 'admin-login-url-change' ), 'desc' => __( 'Always up-to-date geo-location data', 'admin-login-url-change' ) ],
[ 'title' => __( 'Custom redirect for blocked countries', 'admin-login-url-change' ), 'desc' => __( 'Show a custom page to blocked visitors', 'admin-login-url-change' ) ],
],
],
'login-limit' => [
'label' => __( 'Login Attempt Limiter', 'admin-login-url-change' ),
'icon' => 'blue',
'subtitle' => __( 'Stop brute-force attacks by limiting login attempts', 'admin-login-url-change' ),
'desc' => __( 'Automatically lock out IPs that exceed a configurable number of failed login attempts.', 'admin-login-url-change' ),
'features' => [
[ 'title' => __( 'Configurable attempt threshold', 'admin-login-url-change' ), 'desc' => __( 'Set max attempts before lockout', 'admin-login-url-change' ) ],
[ 'title' => __( 'Auto lockout with custom duration', 'admin-login-url-change' ), 'desc' => __( 'Choose lockout time in minutes', 'admin-login-url-change' ) ],
[ 'title' => __( 'Email alerts on lockout', 'admin-login-url-change' ), 'desc' => __( 'Get notified about lockout events', 'admin-login-url-change' ) ],
[ 'title' => __( 'Allowlist trusted IPs', 'admin-login-url-change' ), 'desc' => __( 'Never lock out your own IP', 'admin-login-url-change' ) ],
],
],
'two-fa' => [
'label' => __( 'Two-Factor Authentication', 'admin-login-url-change' ),
'icon' => 'purple',
'subtitle' => __( 'Add an extra layer of security with 2FA', 'admin-login-url-change' ),
'desc' => __( 'Require a time-based one-time password (TOTP) or email code on every login.', 'admin-login-url-change' ),
'features' => [
[ 'title' => __( 'Email-based OTP fallback', 'admin-login-url-change' ), 'desc' => __( 'Works without an authenticator app', 'admin-login-url-change' ) ],
[ 'title' => __( 'Trusted device remember (30 days)', 'admin-login-url-change' ), 'desc' => __( 'Skip 2FA on trusted devices', 'admin-login-url-change' ) ],
],
],
];
foreach ( $pro_tabs as $tab_id => $tab ) :
?>
render_sidebar( $score, $circumference, $is_pro ); ?>