Constants

CPT_NAME

CPT_NAME ='rcb-cookie'

META_NAME_PROVIDER

META_NAME_PROVIDER ='provider'

META_NAME_IS_EMBEDDING_ONLY_EXTERNAL_RESOURCES

META_NAME_IS_EMBEDDING_ONLY_EXTERNAL_RESOURCES ='isEmbeddingOnlyExternalResources'

META_NAME_EPRIVACY_USA

META_NAME_EPRIVACY_USA ='ePrivacyUSA'

META_NAME_TECHNICAL_DEFINITIONS

META_NAME_TECHNICAL_DEFINITIONS ='technicalDefinitions'

META_NAME_CODE_DYNAMICS

META_NAME_CODE_DYNAMICS ='codeDynamics'

META_NAME_PROVIDER_PRIVACY_POLICY_URL

META_NAME_PROVIDER_PRIVACY_POLICY_URL ='providerPrivacyPolicyUrl'

META_NAME_TAG_MANAGER_OPT_IN_EVENT_NAME

META_NAME_TAG_MANAGER_OPT_IN_EVENT_NAME ='tagManagerOptInEventName'

META_NAME_TAG_MANAGER_OPT_OUT_EVENT_NAME

META_NAME_TAG_MANAGER_OPT_OUT_EVENT_NAME ='tagManagerOptOutEventName'

META_NAME_CODE_OPT_IN

META_NAME_CODE_OPT_IN ='codeOptIn'

META_NAME_CODE_OPT_OUT

META_NAME_CODE_OPT_OUT ='codeOptOut'

META_NAME_DELETE_TECHNICAL_DEFINITIONS_AFTER_OPT_OUT

META_NAME_DELETE_TECHNICAL_DEFINITIONS_AFTER_OPT_OUT ='deleteTechnicalDefinitionsAfterOptOut'

META_NAME_CODE_ON_PAGE_LOAD

META_NAME_CODE_ON_PAGE_LOAD ='codeOnPageLoad'

SYNC_META_COPY

SYNC_META_COPY =array(\DevOwl\RealCookieBanner\settings\Cookie::META_NAME_CONSENT_FORWARDING_UNIQUE_NAME, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_IS_EMBEDDING_ONLY_EXTERNAL_RESOURCES, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_LEGAL_BASIS, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_EPRIVACY_USA, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_TECHNICAL_DEFINITIONS, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_CODE_DYNAMICS, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_TAG_MANAGER_OPT_IN_EVENT_NAME, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_TAG_MANAGER_OPT_OUT_EVENT_NAME, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_CODE_OPT_IN, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_EXECUTE_CODE_OPT_IN_WHEN_NO_TAG_MANAGER_CONSENT_IS_GIVEN, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_CODE_OPT_OUT, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_EXECUTE_CODE_OPT_OUT_WHEN_NO_TAG_MANAGER_CONSENT_IS_GIVEN, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_DELETE_TECHNICAL_DEFINITIONS_AFTER_OPT_OUT, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_CODE_ON_PAGE_LOAD, \DevOwl\RealCookieBanner\settings\Blocker::META_NAME_PRESET_ID, \DevOwl\RealCookieBanner\settings\Blocker::META_NAME_PRESET_VERSION)

SYNC_META_COPY_ONCE

SYNC_META_COPY_ONCE =array(\DevOwl\RealCookieBanner\settings\Cookie::META_NAME_PROVIDER, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_PROVIDER_PRIVACY_POLICY_URL)

TECHNICAL_HANDLING_META_COLLECTION

TECHNICAL_HANDLING_META_COLLECTION =array(\DevOwl\RealCookieBanner\settings\Cookie::META_NAME_TAG_MANAGER_OPT_IN_EVENT_NAME, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_TAG_MANAGER_OPT_OUT_EVENT_NAME, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_CODE_OPT_IN, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_EXECUTE_CODE_OPT_IN_WHEN_NO_TAG_MANAGER_CONSENT_IS_GIVEN, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_CODE_OPT_OUT, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_EXECUTE_CODE_OPT_OUT_WHEN_NO_TAG_MANAGER_CONSENT_IS_GIVEN, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_CODE_ON_PAGE_LOAD)

SYNC_OPTIONS

SYNC_OPTIONS =array('data' => array('menu_order'), 'taxonomies' => array(\DevOwl\RealCookieBanner\settings\CookieGroup::TAXONOMY_NAME), 'meta' => array('copy' => \DevOwl\RealCookieBanner\settings\Cookie::SYNC_META_COPY, 'copy-once' => \DevOwl\RealCookieBanner\settings\Cookie::SYNC_META_COPY_ONCE))

META_KEYS

META_KEYS =array(\DevOwl\RealCookieBanner\settings\Cookie::META_NAME_PROVIDER, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_CONSENT_FORWARDING_UNIQUE_NAME, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_IS_EMBEDDING_ONLY_EXTERNAL_RESOURCES, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_LEGAL_BASIS, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_EPRIVACY_USA, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_TECHNICAL_DEFINITIONS, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_CODE_DYNAMICS, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_PROVIDER_PRIVACY_POLICY_URL, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_TAG_MANAGER_OPT_IN_EVENT_NAME, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_TAG_MANAGER_OPT_OUT_EVENT_NAME, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_CODE_OPT_IN, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_EXECUTE_CODE_OPT_IN_WHEN_NO_TAG_MANAGER_CONSENT_IS_GIVEN, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_CODE_OPT_OUT, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_EXECUTE_CODE_OPT_OUT_WHEN_NO_TAG_MANAGER_CONSENT_IS_GIVEN, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_DELETE_TECHNICAL_DEFINITIONS_AFTER_OPT_OUT, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_CODE_ON_PAGE_LOAD, \DevOwl\RealCookieBanner\settings\Blocker::META_NAME_PRESET_ID)

CAPABILITIES

CAPABILITIES =array('edit_%s', 'read_%s', 'delete_%s', 'edit_%ss', 'edit_others_%ss', 'publish_%ss', 'read_private_%ss', 'delete_%ss', 'delete_private_%ss', 'delete_published_%ss', 'delete_others_%ss', 'edit_private_%ss', 'edit_published_%ss', 'edit_%ss')

This capabilities are added to the role.

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

register_cap()

Register capabilities to administrator role to allow cookie management.

register()

register()

Register custom post type.

getOrdered()

getOrdered(integer  $groupId,boolean  $force = false,array<mixed,\WP_Post>  $usePosts = null): array<mixed,\WP_Post>|\WP_Error

Get all available cookies ordered by group. You also get a `metas` property in the returned WP_Post instance with all RCB-relevant metas.

Parameters

integer $groupId
boolean $force
array<mixed,\WP_Post> $usePosts

If set, only meta is applied to the passed posts

Returns

array<mixed,\WP_Post>|\WP_Error

getUnassignedCookies()

getUnassignedCookies()

Get unassigned services (cookies without cookie group).

getPublicCount()

getPublicCount(): integer

Get a total count of published cookies.

Returns

integer

getAllCount()

getAllCount(): integer

Get a total count of all cookies.

Returns

integer

getServiceByIdentifier()

getServiceByIdentifier(string  $identifier)

Get a created service by identifier.

Parameters

string $identifier

rest_item_schema()

rest_item_schema(array  $schema)

Modify the cookie item schema and allow to pass the opt-in codes as base64-encoded strings so they do not get inspected as XSS e.g. in Cloudflare.

Parameters

array $schema

new_version_installation_after_3_0_2()

new_version_installation_after_3_0_2(string|false  $installed)

Multiple metadata rename migrations.

Parameters

string|false $installed

applyMetaRenameBackwardsCompatibility()

applyMetaRenameBackwardsCompatibility(array  $revision,boolean  $independent)

Modify already given consents and adjust the metadata field names for "List of consents".

Parameters

array $revision
boolean $independent

__construct()

__construct()

C'tor.