feat(modal): add rollout telemetry foundation
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8b728295a9
commit
113a6bcab0
14 files changed
+320
-1
No files matched your search
@@ -178,4 +178,13 @@ trait DomainGroups {
|
||||
public static function get_system_tools_settings(): array {
|
||||
return Capabilities::get_system_tools_settings();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取前台弹窗按领域灰度开关。
|
||||
*
|
||||
* @return array{identity:bool,badges:bool,orders:bool,vip:bool}
|
||||
*/
|
||||
public static function get_frontend_modal_rollout_settings(): array {
|
||||
return ModalRuntime::get_frontend_modal_rollout_settings();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
/**
|
||||
* Frontend modal runtime settings.
|
||||
*
|
||||
* @package AKSRT
|
||||
*/
|
||||
|
||||
namespace AKSRT\Settings;
|
||||
|
||||
defined('ABSPATH') || exit;
|
||||
|
||||
class ModalRuntime {
|
||||
|
||||
/**
|
||||
* Read the per-domain frontend modal rollout switches.
|
||||
*
|
||||
* @return array{identity:bool,badges:bool,orders:bool,vip:bool}
|
||||
*/
|
||||
public static function get_frontend_modal_rollout_settings(): array {
|
||||
$settings = Settings::get_all();
|
||||
|
||||
return [
|
||||
'identity' => !empty($settings['frontend_modal_rollout_identity']),
|
||||
'badges' => !empty($settings['frontend_modal_rollout_badges']),
|
||||
'orders' => !empty($settings['frontend_modal_rollout_orders']),
|
||||
'vip' => !empty($settings['frontend_modal_rollout_vip']),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user