Login's "Style login page" and "Login logo" fields to * wp-login.php. Both settings existed in the UI with no implementation * behind them until now — this is that implementation. * * Deliberately a single fixed dark theme rather than reusing the admin * shell's per-preset palette system (themePresets.js): the login screen * loads independently of wp-admin, so none of the --aurora-* CSS variables * set on html.aurora-ready are available there, and duplicating the * hue-ramp logic in PHP just to match whichever preset happens to be * selected wasn't worth the upkeep for a first pass. */ class LoginStyle { public function __construct() { add_action("login_enqueue_scripts", [self::class, "print_styles"]); add_filter("login_headerurl", [self::class, "header_url"]); } private static function enabled() { return (bool) Settings::get("style_login", false); } public static function header_url($url) { return self::enabled() ? home_url("/") : $url; } public static function print_styles() { if (!self::enabled()) { return; } $logo = trim((string) Settings::get("login_logo", "")); $bg_image = trim((string) Settings::get("login_bg_image", "")); // Colors fall back to the original fixed dark theme when unset; invalid // values are dropped by sanitize_hex_color (returns null) then fall back. $bg_color = sanitize_hex_color((string) Settings::get("login_bg_color", "")) ?: ""; $form_bg = sanitize_hex_color((string) Settings::get("login_form_bg", "")) ?: "#1c2333"; $accent = sanitize_hex_color((string) Settings::get("login_button_color", "")) ?: "#4f7cff"; $custom_css = str_ireplace("", "", (string) Settings::get("login_custom_css", "")); if ($bg_image) { $background = "url(" . esc_url($bg_image) . ") center / cover no-repeat"; } elseif ($bg_color) { $background = $bg_color; } else { $background = "linear-gradient(135deg, #1b2333 0%, #0f1420 100%)"; } ?> stripped above. ?>