31 lines
1.0 KiB
PHP
31 lines
1.0 KiB
PHP
<?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}
|
|
*/
|
|
public static function get_frontend_modal_rollout(): array {
|
|
$settings = Settings::get_all();
|
|
|
|
return [
|
|
// Canonical-only flows must be live when the option has never been configured.
|
|
// An explicit false remains an intentional per-domain kill switch.
|
|
'vip' => !array_key_exists('frontend_modal_rollout_vip', $settings) || !empty($settings['frontend_modal_rollout_vip']),
|
|
'order' => !array_key_exists('frontend_modal_rollout_order', $settings) || !empty($settings['frontend_modal_rollout_order']),
|
|
'identity' => !array_key_exists('frontend_modal_rollout_identity', $settings) || !empty($settings['frontend_modal_rollout_identity']),
|
|
];
|
|
}
|
|
}
|