Files
ogre-consent/inc/class-config.php
T
Cooper Dalrymple b8902b4afa
Validate Build / validate-build (push) Canceled after 0s
More work on this, incomplete!
2026-10-06 17:00:20 -05:00

53 lines
1.3 KiB
PHP

<?php
/**
* @package ogre-consent
* @author cleverogre
* @copyright 2026 CleverOgre
* @license GLP-3.0-or-later
* @version 0.0.0
* @since 0.0.0
*/
namespace Ogre\Consent;
use Ogre\Consent as Plugin;
use Ogre\Singleton;
defined('ABSPATH') || exit;
final class Config {
use Singleton;
public function get_config(): array
{
// See https://klaro.org/docs/integration/annotated-configuration
return apply_filters('ogre_consent_config', [
'elementID' => Plugin::get_id(),
'storageMethod' => 'localStorage',
'storageName' => Plugin::get_id(),
'cookieDomain' => parse_url(site_url(), PHP_URL_HOST),
'default' => true,
'mustConsent' => true,
'acceptAll' => true,
'hideLearnMore' => true,
'disablePoweredBy' => true,
'services' => Services::instance()->get_config(),
]);
}
public static function get_purposes(): array
{
return [
'advertising' => Plugin::__('Advertising'),
'analytics' => Plugin::__('Analytics'),
'livechat' => Plugin::__('Livechat'),
'marketing' => Plugin::__('Marketing'),
'security' => Plugin::__('Security'),
'styling' => Plugin::__('Styling'),
];
}
}
Config::instance();