Files
Cooper Dalrymple 5f702470cc
Validate Build / validate-build (push) Failing after 36s
Initial setup, untested
2026-08-25 14:58:39 -05:00

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();