Constants

TAXONOMY_NAME

TAXONOMY_NAME ='rcb-cookie-group'

META_NAME_ORDER

META_NAME_ORDER ='order'

META_NAME_IS_ESSENTIAL

META_NAME_IS_ESSENTIAL ='isEssential'

SYNC_META_COPY_AND_COPY_ONCE

SYNC_META_COPY_AND_COPY_ONCE =array(\DevOwl\RealCookieBanner\settings\CookieGroup::META_NAME_IS_ESSENTIAL, \DevOwl\RealCookieBanner\settings\CookieGroup::META_NAME_ORDER)

SYNC_OPTIONS

SYNC_OPTIONS =array('meta' => array('copy' => \DevOwl\RealCookieBanner\settings\CookieGroup::SYNC_META_COPY_AND_COPY_ONCE, 'copy-once' => \DevOwl\RealCookieBanner\settings\CookieGroup::SYNC_META_COPY_AND_COPY_ONCE))

META_KEYS

META_KEYS =array(\DevOwl\RealCookieBanner\settings\CookieGroup::META_NAME_IS_ESSENTIAL)

Properties

$cacheGetOrdered

$cacheGetOrdered :

Type

Methods

getPluginConstantPrefix()

getPluginConstantPrefix(): string

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

Returns

string

register()

register()

Register custom taxonomy.

ensureEssentialGroupCreated()

ensureEssentialGroupCreated()

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

deleted()

deleted(integer  $term,integer  $tt_id,object  $deleted_term,array<mixed,integer>  $object_ids)

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

Parameters

integer $term
integer $tt_id
object $deleted_term
array<mixed,integer> $object_ids

getOrdered()

getOrdered(boolean  $force = false): array<mixed,\WP_Term>|\WP_Error

Get all available cookie groups ordered.

Parameters

boolean $force

Returns

array<mixed,\WP_Term>|\WP_Error

getEssentialGroup()

getEssentialGroup(boolean  $force = false): \WP_Term|null

Get the WP_Term of the essential group.

Parameters

boolean $force

If true, cache will be invalidated

Returns

\WP_Term|null

getDefaultDescriptions()

getDefaultDescriptions(string  $localizedKeys = false)

Get default description texts.

Parameters

string $localizedKeys

getEssentialGroupId()

getEssentialGroupId(): integer|null

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

Returns

integer|null

createNonEssentialDefaults()

createNonEssentialDefaults()

Create all default terms expect "Essential".

__construct()

__construct()

C'tor.