public static function is_domain_mode() { // Don't act in domain mode if none are configured $domains = self::config()->domains; if (empty($domains)) { return false; } // Check environment if (defined('SS_FLUENT_FORCE_DOMAIN') && SS_FLUENT_FORCE_DOMAIN) { return true; } // Check config if (self::config()->force_domain) { return true; } // Check if the current domain is included in the list of configured domains (default) return array_key_exists(strtolower($_SERVER['HTTP_HOST']), $domains); }