Documentation

CookieGroup
in package
Uses UtilsProvider

Register cookie group taxonomy.

Table of Contents

Constants

HTML_ATTRIBUTE_SKIP_IF_ACTIVE  = 'skip-if-active'
HTML_ATTRIBUTE_SKIP_WRITE  = 'skip-write'
META_KEYS  = [\DevOwl\RealCookieBanner\settings\CookieGroup::META_NAME_IS_ESSENTIAL]
META_NAME_IS_ESSENTIAL  = 'isEssential'
META_NAME_ORDER  = 'order'
SYNC_META_COPY_AND_COPY_ONCE  = [\DevOwl\RealCookieBanner\settings\CookieGroup::META_NAME_IS_ESSENTIAL, \DevOwl\RealCookieBanner\settings\CookieGroup::META_NAME_ORDER]
SYNC_OPTIONS  = ['meta' => ['copy' => \DevOwl\RealCookieBanner\settings\CookieGroup::SYNC_META_COPY_AND_COPY_ONCE, 'copy-once' => \DevOwl\RealCookieBanner\settings\CookieGroup::SYNC_META_COPY_AND_COPY_ONCE]]
TAXONOMY_NAME  = 'rcb-cookie-group'

Properties

$cacheGetOrdered  : mixed
$me  : CookieGroup
Singleton instance.

Methods

deleted()  : mixed
A cookie group got deleted, also delete all associated cookies.
ensureEssentialGroupCreated()  : mixed
Ensures the "Essentials" term exists. Make sure to create the temporary text domain.
getDefaultDescriptions()  : mixed
Get default description texts.
getDefaultGroupNames()  : mixed
Get default texts for service groups.
getEssentialGroup()  : WP_Term|null
Get the WP_Term of the essential group.
getEssentialGroupId()  : int|null
Get only the essential group ID. This method can be more efficient compared to `getEssentialGroup` because it does no casts and additional queries.
getInstance()  : CookieGroup
Get singleton instance.
getOrdered()  : array<string|int, WP_Term>|WP_Error
Get all available cookie groups ordered.
getPluginConstantPrefix()  : string
Get the prefix of this plugin so composer packages can dynamically build other constant values on it.
modifySkipIfActive()  : mixed
Make `skip-if-active` work with comma-separated list of active plugins. That means, if a given plugin is active it automatically skips the HTML tag.
register()  : mixed
Register custom taxonomy.
toJson()  : mixed
Localize available cookie groups for frontend.
__construct()  : mixed
C'tor.

Constants

HTML_ATTRIBUTE_SKIP_IF_ACTIVE

public mixed HTML_ATTRIBUTE_SKIP_IF_ACTIVE = 'skip-if-active'

HTML_ATTRIBUTE_SKIP_WRITE

public mixed HTML_ATTRIBUTE_SKIP_WRITE = 'skip-write'

META_KEYS

public mixed META_KEYS = [\DevOwl\RealCookieBanner\settings\CookieGroup::META_NAME_IS_ESSENTIAL]

META_NAME_IS_ESSENTIAL

public mixed META_NAME_IS_ESSENTIAL = 'isEssential'

META_NAME_ORDER

public mixed META_NAME_ORDER = 'order'

SYNC_META_COPY_AND_COPY_ONCE

public mixed SYNC_META_COPY_AND_COPY_ONCE = [\DevOwl\RealCookieBanner\settings\CookieGroup::META_NAME_IS_ESSENTIAL, \DevOwl\RealCookieBanner\settings\CookieGroup::META_NAME_ORDER]

SYNC_OPTIONS

public mixed SYNC_OPTIONS = ['meta' => ['copy' => \DevOwl\RealCookieBanner\settings\CookieGroup::SYNC_META_COPY_AND_COPY_ONCE, 'copy-once' => \DevOwl\RealCookieBanner\settings\CookieGroup::SYNC_META_COPY_AND_COPY_ONCE]]

TAXONOMY_NAME

public mixed TAXONOMY_NAME = 'rcb-cookie-group'

Properties

$cacheGetOrdered

private mixed $cacheGetOrdered = []

Methods

deleted()

A cookie group got deleted, also delete all associated cookies.

public deleted(int $term, int $tt_id, object $deleted_term, array<string|int, int> $object_ids) : mixed
Parameters
$term : int
$tt_id : int
$deleted_term : object
$object_ids : array<string|int, int>

ensureEssentialGroupCreated()

Ensures the "Essentials" term exists. Make sure to create the temporary text domain.

public ensureEssentialGroupCreated() : mixed

getDefaultDescriptions()

Get default description texts.

public getDefaultDescriptions([string $localizedKeys = false ]) : mixed
Parameters
$localizedKeys : string = false

getDefaultGroupNames()

Get default texts for service groups.

public getDefaultGroupNames() : mixed

getEssentialGroup()

Get the WP_Term of the essential group.

public getEssentialGroup([bool $force = false ]) : WP_Term|null
Parameters
$force : bool = false

If true, cache will be invalidated

Return values
WP_Term|null

getEssentialGroupId()

Get only the essential group ID. This method can be more efficient compared to `getEssentialGroup` because it does no casts and additional queries.

public getEssentialGroupId() : int|null
Return values
int|null

getOrdered()

Get all available cookie groups ordered.

public getOrdered([bool $force = false ]) : array<string|int, WP_Term>|WP_Error
Parameters
$force : bool = false
Return values
array<string|int, WP_Term>|WP_Error

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

modifySkipIfActive()

Make `skip-if-active` work with comma-separated list of active plugins. That means, if a given plugin is active it automatically skips the HTML tag.

public modifySkipIfActive(string $html[, string $identifier = null ]) : mixed
Parameters
$html : string
$identifier : string = null

The template identifier (can be null)

Tags
see
https://regex101.com/r/gIPJRq/2

register()

Register custom taxonomy.

public register() : mixed

toJson()

Localize available cookie groups for frontend.

public toJson() : mixed

        
On this page

Search results