TcfBanner
in package
If TCF is active, we need to modify some behaviors like forbid the use of "Hide" in decisions in customizer. For "new controls" check out the `TcfBannerCustomize` class.
Table of Contents
Constants
Properties
Methods
- customizeBasicLayoutHint() : mixed
- Add a notice to the "Basic Layout" section.
- customizeButtonContrastRatioValidator() : mixed
- If TCF is active, there must be a minimum contrast ratio of 5 for call-to-action buttons.
- customizeButtonFontSizeNotice() : mixed
- If TCF is active, the font (family), font size and font weight must be the same as of "Accept all".
- customizeDisableHide() : mixed
- The decisions no longer can have the "Hide" as available dropdown selection, remove it.
- getInstance() : mixed
- Get singleton instance.
- hooks() : mixed
- Initialize filters at `plugins_loaded` time.
- localizeTexts() : mixed
- Texts for TCF groups view.
- multilingual() : mixed
- Make texts multilingual.
- optionDisableDecisionHide() : mixed
- The decisions no longer can have "Hide" as value, fallback to default.
Constants
MINIMUM_BUTTON_CONTRAST_RATIO
public
mixed
MINIMUM_BUTTON_CONTRAST_RATIO
= 5
Properties
$me
Singleton instance.
private
static TcfBanner
$me
= null
Methods
customizeBasicLayoutHint()
Add a notice to the "Basic Layout" section.
public
customizeBasicLayoutHint(array<string|int, mixed> &$sections) : mixed
Parameters
- $sections : array<string|int, mixed>
customizeButtonContrastRatioValidator()
If TCF is active, there must be a minimum contrast ratio of 5 for call-to-action buttons.
public
customizeButtonContrastRatioValidator(array<string|int, mixed> &$sections) : mixed
Parameters
- $sections : array<string|int, mixed>
customizeButtonFontSizeNotice()
If TCF is active, the font (family), font size and font weight must be the same as of "Accept all".
public
customizeButtonFontSizeNotice(array<string|int, mixed> &$sections) : mixed
Parameters
- $sections : array<string|int, mixed>
customizeDisableHide()
The decisions no longer can have the "Hide" as available dropdown selection, remove it.
public
customizeDisableHide(array<string|int, mixed> &$sections) : mixed
Parameters
- $sections : array<string|int, mixed>
getInstance()
Get singleton instance.
public
static getInstance() : mixed
Tags
hooks()
Initialize filters at `plugins_loaded` time.
public
hooks() : mixed
localizeTexts()
Texts for TCF groups view.
public
localizeTexts() : mixed
multilingual()
Make texts multilingual.
public
multilingual() : mixed
optionDisableDecisionHide()
The decisions no longer can have "Hide" as value, fallback to default.
public
optionDisableDecisionHide(string $value, string $id) : mixed
Parameters
- $value : string
- $id : string