45 lines
997 B
PHP
45 lines
997 B
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;
|
|
|
|
protected function __construct() {
|
|
|
|
}
|
|
|
|
public function get_config(): array
|
|
{
|
|
// See https://klaro.org/docs/integration/annotated-configuration
|
|
$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,
|
|
'services' => Services::instance()->get_config(),
|
|
];
|
|
return apply_filters('ogre_consent_config', $config);
|
|
}
|
|
|
|
}
|
|
|
|
Config::instance();
|