fix(modal): align rollout schema contract

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-04 21:31:55 +08:00
co-authored by Claude Fable 5
parent 113a6bcab0
commit 1f004aea46
10 changed files with 40 additions and 39 deletions
+29
View File
@@ -0,0 +1,29 @@
<?php
/**
* Frontend modal runtime settings.
*
* @package AKSRT
*/
namespace AKSRT\Settings;
defined('ABSPATH') || exit;
class FrontendModalRuntime {
/**
* Read the per-domain frontend modal rollout switches.
*
* @return array{vip:bool,order:bool,identity:bool,badge:bool}
*/
public static function get_frontend_modal_rollout(): array {
$settings = Settings::get_all();
return [
'vip' => !empty($settings['frontend_modal_rollout_vip']),
'order' => !empty($settings['frontend_modal_rollout_order']),
'identity' => !empty($settings['frontend_modal_rollout_identity']),
'badge' => !empty($settings['frontend_modal_rollout_badge']),
];
}
}