Documentation

TCF extends AbstractTcf
in package
implements IOverrideTCF Uses TCF, UtilsProvider

TCF settings.

Table of Contents

Interfaces

IOverrideTCF

Constants

ALLOWED_SCOPE_OF_CONSENT  = [self::SCOPE_OF_CONSENT_SERVICE]
DEFAULT_TCF  = false
DEFAULT_TCF_ACCEPTED_TIME  = ''
DEFAULT_TCF_FIRST_ACCEPTED_TIME  = ''
DEFAULT_TCF_GVL_DOWNLOAD_TIME  = ''
DEFAULT_TCF_SCOPE_OF_CONSENT  = self::SCOPE_OF_CONSENT_SERVICE
OPTION_GROUP  = 'options'
OPTION_TCF_GVL_NEXT_DOWNLOAD_TIME  = RCB_OPT_PREFIX . '-tcf-gvl-next-download-time'
SCOPE_OF_CONSENT_SERVICE  = 'service-specific'
SETTING_TCF  = RCB_OPT_PREFIX . '-tcf'
SETTING_TCF_ACCEPTED_TIME  = RCB_OPT_PREFIX . '-tcf-accepted-time'
SETTING_TCF_FIRST_ACCEPTED_TIME  = RCB_OPT_PREFIX . '-tcf-first-accepted-time'
SETTING_TCF_GVL_DOWNLOAD_TIME  = RCB_OPT_PREFIX . '-tcf-gvl-download-time'
SETTING_TCF_PUBLISHER_CC  = RCB_OPT_PREFIX . '-tcf-publisher-cc'
TCF publisher country.
SETTING_TCF_SCOPE_OF_CONSENT  = RCB_OPT_PREFIX . '-tcf-scope-of-consent'
TCF scope of consent (Global or local).

Properties

$me  : TCF
Singleton instance.
$previousActive  : bool
Save the state of currently active so we can calculate the timestamps for (first) accepted time.
$settings  : Settings
See Settings

Methods

clearGvl()  : mixed
enableOptionsAutoload()  : mixed
Initially `add_option` to avoid autoloading issues.
fourLetterLanguageCodeToTwoLetterCode()  : mixed
Sanitize a 4-letter language code to 2-letter language code as it is the only one which is currently supported by TCF.
getAcceptedTime()  : mixed
getFirstAcceptedTime()  : mixed
getGvl()  : AbstractGvlPersistance
Get GVL persistence class.
getGvlDownloadTime()  : mixed
getInstance()  : TCF
Get singleton instance.
getNextUpdateTime()  : mixed
Changes to the Global Vendor List are published weekly at 5:00 PM Central European Time on Thursdays.
getPluginConstantPrefix()  : string
Get the prefix of this plugin so composer packages can dynamically build other constant values on it.
getScopeOfConsent()  : string
Get scope of consent.
getSettings()  : mixed
Getter.
getVendorConfigurations()  : array<string|int, VendorConfiguration>
Get the list of created TCF vendor configurations.
isActive()  : bool
Check if compatibility is enabled.
localize()  : mixed
Localize frontend.
new_version_installation()  : mixed
When a new version of Real Cookie Banner got installed, automatically download the new GVL.
overrideEnableOptionsAutoload()  : mixed
overrideRegister()  : mixed
probablyUpdateGvl()  : mixed
register()  : mixed
Register settings.
rest_pre_get_setting()  : mixed
Output the accepted time as ISO string instead of mysql formatted string.
setSettings()  : mixed
Setter.
updated_option_active()  : mixed
The option to enable TCF got updated, let's save the time of consent.
updateGvl()  : mixed
__construct()  : mixed
C'tor.

Constants

public mixed ALLOWED_SCOPE_OF_CONSENT = [self::SCOPE_OF_CONSENT_SERVICE]

DEFAULT_TCF

public mixed DEFAULT_TCF = false

DEFAULT_TCF_ACCEPTED_TIME

public mixed DEFAULT_TCF_ACCEPTED_TIME = ''

DEFAULT_TCF_FIRST_ACCEPTED_TIME

public mixed DEFAULT_TCF_FIRST_ACCEPTED_TIME = ''

DEFAULT_TCF_GVL_DOWNLOAD_TIME

public mixed DEFAULT_TCF_GVL_DOWNLOAD_TIME = ''
public mixed DEFAULT_TCF_SCOPE_OF_CONSENT = self::SCOPE_OF_CONSENT_SERVICE

OPTION_GROUP

public mixed OPTION_GROUP = 'options'

OPTION_TCF_GVL_NEXT_DOWNLOAD_TIME

public mixed OPTION_TCF_GVL_NEXT_DOWNLOAD_TIME = RCB_OPT_PREFIX . '-tcf-gvl-next-download-time'
public mixed SCOPE_OF_CONSENT_SERVICE = 'service-specific'

SETTING_TCF

public mixed SETTING_TCF = RCB_OPT_PREFIX . '-tcf'

SETTING_TCF_ACCEPTED_TIME

public mixed SETTING_TCF_ACCEPTED_TIME = RCB_OPT_PREFIX . '-tcf-accepted-time'

SETTING_TCF_FIRST_ACCEPTED_TIME

public mixed SETTING_TCF_FIRST_ACCEPTED_TIME = RCB_OPT_PREFIX . '-tcf-first-accepted-time'

SETTING_TCF_GVL_DOWNLOAD_TIME

public mixed SETTING_TCF_GVL_DOWNLOAD_TIME = RCB_OPT_PREFIX . '-tcf-gvl-download-time'

SETTING_TCF_PUBLISHER_CC

TCF publisher country.

public mixed SETTING_TCF_PUBLISHER_CC = RCB_OPT_PREFIX . '-tcf-publisher-cc'
Tags
deprecated

No longer in use, use General::SETTING_OPERATOR_COUNTRY instead!

TCF scope of consent (Global or local).

public mixed SETTING_TCF_SCOPE_OF_CONSENT = RCB_OPT_PREFIX . '-tcf-scope-of-consent'
Tags
deprecated

No longer in use

Properties

$me

Singleton instance.

private static TCF $me = null

$previousActive

Save the state of currently active so we can calculate the timestamps for (first) accepted time.

private bool $previousActive = null

Methods

clearGvl()

public clearGvl() : mixed

enableOptionsAutoload()

Initially `add_option` to avoid autoloading issues.

public enableOptionsAutoload() : mixed

fourLetterLanguageCodeToTwoLetterCode()

Sanitize a 4-letter language code to 2-letter language code as it is the only one which is currently supported by TCF.

public static fourLetterLanguageCodeToTwoLetterCode(string $language) : mixed
Parameters
$language : string

getAcceptedTime()

public getAcceptedTime() : mixed

getFirstAcceptedTime()

public getFirstAcceptedTime() : mixed

getGvlDownloadTime()

public getGvlDownloadTime() : mixed

getInstance()

Get singleton instance.

public static getInstance() : TCF
Tags
codeCoverageIgnore
Return values
TCF

getNextUpdateTime()

Changes to the Global Vendor List are published weekly at 5:00 PM Central European Time on Thursdays.

public static getNextUpdateTime() : mixed

getPluginConstantPrefix()

Get the prefix of this plugin so composer packages can dynamically build other constant values on it.

public getPluginConstantPrefix() : string
Tags
codeCoverageIgnore

It only returns a string with the constant prefix

Return values
string

getScopeOfConsent()

Get scope of consent.

public abstract getScopeOfConsent() : string
Return values
string

Can be service

getSettings()

Getter.

public getSettings() : mixed
Tags
codeCoverageIgnore

isActive()

Check if compatibility is enabled.

public abstract isActive() : bool
Return values
bool

localize()

Localize frontend.

public localize(array<string|int, mixed> $arr, string $context) : mixed
Parameters
$arr : array<string|int, mixed>
$context : string

new_version_installation()

When a new version of Real Cookie Banner got installed, automatically download the new GVL.

public new_version_installation() : mixed

overrideEnableOptionsAutoload()

public overrideEnableOptionsAutoload() : mixed

overrideRegister()

public overrideRegister() : mixed

probablyUpdateGvl()

public probablyUpdateGvl() : mixed

register()

Register settings.

public register() : mixed

rest_pre_get_setting()

Output the accepted time as ISO string instead of mysql formatted string.

public rest_pre_get_setting(mixed $result, string $name, array<string|int, mixed> $args) : mixed
Parameters
$result : mixed

Value to use for the requested setting. Can be a scalar matching the registered schema for the setting, or null to follow the default get_option() behavior.

$name : string

Setting name (as shown in REST API responses).

$args : array<string|int, mixed>

Arguments passed to register_setting() for this setting.

updated_option_active()

The option to enable TCF got updated, let's save the time of consent.

public updated_option_active(WP_REST_Response $response, WP_REST_Request $request) : mixed
Parameters
$response : WP_REST_Response
$request : WP_REST_Request

updateGvl()

public updateGvl([mixed $force = false ]) : mixed
Parameters
$force : mixed = false

__construct()

C'tor.

private __construct() : mixed

        
On this page

Search results