Cookie
in package
Uses
UtilsProvider
Register cookie custom post type.
Table of Contents
Constants
- CAPABILITIES = ['edit_post' => \DevOwl\RealCookieBanner\Core::MANAGE_MIN_CAPABILITY, 'read_post' => \DevOwl\RealCookieBanner\Core::MANAGE_MIN_CAPABILITY, 'delete_post' => \DevOwl\RealCookieBanner\Core::MANAGE_MIN_CAPABILITY, 'edit_posts' => \DevOwl\RealCookieBanner\Core::MANAGE_MIN_CAPABILITY, 'edit_others_posts' => \DevOwl\RealCookieBanner\Core::MANAGE_MIN_CAPABILITY, 'publish_posts' => \DevOwl\RealCookieBanner\Core::MANAGE_MIN_CAPABILITY, 'read_private_posts' => \DevOwl\RealCookieBanner\Core::MANAGE_MIN_CAPABILITY, 'delete_posts' => \DevOwl\RealCookieBanner\Core::MANAGE_MIN_CAPABILITY, 'delete_private_posts' => \DevOwl\RealCookieBanner\Core::MANAGE_MIN_CAPABILITY, 'delete_published_posts' => \DevOwl\RealCookieBanner\Core::MANAGE_MIN_CAPABILITY, 'delete_others_posts' => \DevOwl\RealCookieBanner\Core::MANAGE_MIN_CAPABILITY, 'edit_private_posts' => \DevOwl\RealCookieBanner\Core::MANAGE_MIN_CAPABILITY, 'edit_published_posts' => \DevOwl\RealCookieBanner\Core::MANAGE_MIN_CAPABILITY, 'edit_posts' => \DevOwl\RealCookieBanner\Core::MANAGE_MIN_CAPABILITY]
- This capabilities are added to the custom post type. This allows to use one main capability `manage_real_cookie_banner` instead of granular capabilities like `edit_rcb-cookie`, .
- CPT_NAME = 'rcb-cookie'
- META_KEYS = [\DevOwl\RealCookieBanner\settings\Cookie::META_NAME_IS_PROVIDER_CURRENT_WEBSITE, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_PROVIDER, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_PROVIDER_CONTACT_PHONE, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_PROVIDER_CONTACT_EMAIL, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_PROVIDER_CONTACT_LINK, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_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_DATA_PROCESSING_IN_COUNTRIES, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_DATA_PROCESSING_IN_COUNTRIES_SPECIAL_TREATMENTS, \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_PROVIDER_LEGAL_NOTICE_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_GOOGLE_CONSENT_MODE_CONSENT_TYPES, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_EXECUTE_PRIORITY, \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]
- META_NAME_CODE_DYNAMICS = 'codeDynamics'
- META_NAME_CODE_ON_PAGE_LOAD = 'codeOnPageLoad'
- META_NAME_CODE_OPT_IN = 'codeOptIn'
- META_NAME_CODE_OPT_OUT = 'codeOptOut'
- META_NAME_DATA_PROCESSING_IN_COUNTRIES = 'dataProcessingInCountries'
- META_NAME_DATA_PROCESSING_IN_COUNTRIES_SPECIAL_TREATMENTS = 'dataProcessingInCountriesSpecialTreatments'
- META_NAME_DELETE_TECHNICAL_DEFINITIONS_AFTER_OPT_OUT = 'deleteTechnicalDefinitionsAfterOptOut'
- META_NAME_EXECUTE_CODE_OPT_IN_WHEN_NO_TAG_MANAGER_CONSENT_IS_GIVEN = 'executeCodeOptInWhenNoTagManagerConsentIsGiven'
- META_NAME_EXECUTE_CODE_OPT_OUT_WHEN_NO_TAG_MANAGER_CONSENT_IS_GIVEN = 'executeCodeOptOutWhenNoTagManagerConsentIsGiven'
- META_NAME_EXECUTE_PRIORITY = 'executePriority'
- META_NAME_GOOGLE_CONSENT_MODE_CONSENT_TYPES = 'googleConsentModeConsentTypes'
- META_NAME_IS_EMBEDDING_ONLY_EXTERNAL_RESOURCES = 'isEmbeddingOnlyExternalResources'
- META_NAME_IS_PROVIDER_CURRENT_WEBSITE = 'isProviderCurrentWebsite'
- META_NAME_LEGAL_BASIS = 'legalBasis'
- META_NAME_PROVIDER = 'provider'
- META_NAME_PROVIDER_CONTACT_EMAIL = 'providerContactEmail'
- META_NAME_PROVIDER_CONTACT_LINK = 'providerContactLink'
- META_NAME_PROVIDER_CONTACT_PHONE = 'providerContactPhone'
- META_NAME_PROVIDER_LEGAL_NOTICE_URL = 'providerLegalNoticeUrl'
- META_NAME_PROVIDER_PRIVACY_POLICY_URL = 'providerPrivacyPolicyUrl'
- META_NAME_TAG_MANAGER_OPT_IN_EVENT_NAME = 'tagManagerOptInEventName'
- META_NAME_TAG_MANAGER_OPT_OUT_EVENT_NAME = 'tagManagerOptOutEventName'
- META_NAME_TECHNICAL_DEFINITIONS = 'technicalDefinitions'
- META_NAME_UNIQUE_NAME = 'uniqueName'
- SYNC_META_COPY = [\DevOwl\RealCookieBanner\settings\Cookie::META_NAME_UNIQUE_NAME, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_IS_PROVIDER_CURRENT_WEBSITE, \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_DATA_PROCESSING_IN_COUNTRIES, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_DATA_PROCESSING_IN_COUNTRIES_SPECIAL_TREATMENTS, \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_GOOGLE_CONSENT_MODE_CONSENT_TYPES, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_EXECUTE_PRIORITY, \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 = [\DevOwl\RealCookieBanner\settings\Cookie::META_NAME_PROVIDER, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_PROVIDER_CONTACT_PHONE, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_PROVIDER_CONTACT_EMAIL, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_PROVIDER_CONTACT_LINK, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_PROVIDER_PRIVACY_POLICY_URL, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_PROVIDER_LEGAL_NOTICE_URL]
- SYNC_OPTIONS = ['data' => ['menu_order'], 'taxonomies' => [\DevOwl\RealCookieBanner\settings\CookieGroup::TAXONOMY_NAME], 'meta' => ['copy' => \DevOwl\RealCookieBanner\settings\Cookie::SYNC_META_COPY, 'copy-once' => \DevOwl\RealCookieBanner\settings\Cookie::SYNC_META_COPY_ONCE]]
Properties
- $cacheGetOrdered : mixed
- $me : Cookie
- Singleton instance.
Methods
- deregisterPostTypeCapToRoles() : mixed
- Opposite of `registerPostTypeCapToRoles`.
- getAllCount() : int
- Get a total count of all cookies.
- getInstance() : Cookie
- Get singleton instance.
- getOrdered() : array<string|int, 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.
- getPluginConstantPrefix() : string
- Get the prefix of this plugin so composer packages can dynamically build other constant values on it.
- getPublicCount() : int
- Get a total count of published cookies.
- getServiceByIdentifier() : mixed
- Get a created service by identifier.
- getServiceByUniqueName() : mixed
- Get all available services by an unique name.
- getUnassignedCookies() : mixed
- Get unassigned services (cookies without cookie group).
- register() : mixed
- Register custom post type.
- rest_item_schema() : mixed
- 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.
- __construct() : mixed
- C'tor.
Constants
CAPABILITIES
This capabilities are added to the custom post type. This allows to use one main capability `manage_real_cookie_banner` instead of granular capabilities like `edit_rcb-cookie`, .
public
mixed
CAPABILITIES
= ['edit_post' => \DevOwl\RealCookieBanner\Core::MANAGE_MIN_CAPABILITY, 'read_post' => \DevOwl\RealCookieBanner\Core::MANAGE_MIN_CAPABILITY, 'delete_post' => \DevOwl\RealCookieBanner\Core::MANAGE_MIN_CAPABILITY, 'edit_posts' => \DevOwl\RealCookieBanner\Core::MANAGE_MIN_CAPABILITY, 'edit_others_posts' => \DevOwl\RealCookieBanner\Core::MANAGE_MIN_CAPABILITY, 'publish_posts' => \DevOwl\RealCookieBanner\Core::MANAGE_MIN_CAPABILITY, 'read_private_posts' => \DevOwl\RealCookieBanner\Core::MANAGE_MIN_CAPABILITY, 'delete_posts' => \DevOwl\RealCookieBanner\Core::MANAGE_MIN_CAPABILITY, 'delete_private_posts' => \DevOwl\RealCookieBanner\Core::MANAGE_MIN_CAPABILITY, 'delete_published_posts' => \DevOwl\RealCookieBanner\Core::MANAGE_MIN_CAPABILITY, 'delete_others_posts' => \DevOwl\RealCookieBanner\Core::MANAGE_MIN_CAPABILITY, 'edit_private_posts' => \DevOwl\RealCookieBanner\Core::MANAGE_MIN_CAPABILITY, 'edit_published_posts' => \DevOwl\RealCookieBanner\Core::MANAGE_MIN_CAPABILITY, 'edit_posts' => \DevOwl\RealCookieBanner\Core::MANAGE_MIN_CAPABILITY]
..
Tags
CPT_NAME
public
mixed
CPT_NAME
= 'rcb-cookie'
META_KEYS
public
mixed
META_KEYS
= [\DevOwl\RealCookieBanner\settings\Cookie::META_NAME_IS_PROVIDER_CURRENT_WEBSITE, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_PROVIDER, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_PROVIDER_CONTACT_PHONE, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_PROVIDER_CONTACT_EMAIL, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_PROVIDER_CONTACT_LINK, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_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_DATA_PROCESSING_IN_COUNTRIES, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_DATA_PROCESSING_IN_COUNTRIES_SPECIAL_TREATMENTS, \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_PROVIDER_LEGAL_NOTICE_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_GOOGLE_CONSENT_MODE_CONSENT_TYPES, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_EXECUTE_PRIORITY, \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]
META_NAME_CODE_DYNAMICS
public
mixed
META_NAME_CODE_DYNAMICS
= 'codeDynamics'
META_NAME_CODE_ON_PAGE_LOAD
public
mixed
META_NAME_CODE_ON_PAGE_LOAD
= 'codeOnPageLoad'
META_NAME_CODE_OPT_IN
public
mixed
META_NAME_CODE_OPT_IN
= 'codeOptIn'
META_NAME_CODE_OPT_OUT
public
mixed
META_NAME_CODE_OPT_OUT
= 'codeOptOut'
META_NAME_DATA_PROCESSING_IN_COUNTRIES
public
mixed
META_NAME_DATA_PROCESSING_IN_COUNTRIES
= 'dataProcessingInCountries'
META_NAME_DATA_PROCESSING_IN_COUNTRIES_SPECIAL_TREATMENTS
public
mixed
META_NAME_DATA_PROCESSING_IN_COUNTRIES_SPECIAL_TREATMENTS
= 'dataProcessingInCountriesSpecialTreatments'
META_NAME_DELETE_TECHNICAL_DEFINITIONS_AFTER_OPT_OUT
public
mixed
META_NAME_DELETE_TECHNICAL_DEFINITIONS_AFTER_OPT_OUT
= 'deleteTechnicalDefinitionsAfterOptOut'
META_NAME_EXECUTE_CODE_OPT_IN_WHEN_NO_TAG_MANAGER_CONSENT_IS_GIVEN
public
mixed
META_NAME_EXECUTE_CODE_OPT_IN_WHEN_NO_TAG_MANAGER_CONSENT_IS_GIVEN
= 'executeCodeOptInWhenNoTagManagerConsentIsGiven'
META_NAME_EXECUTE_CODE_OPT_OUT_WHEN_NO_TAG_MANAGER_CONSENT_IS_GIVEN
public
mixed
META_NAME_EXECUTE_CODE_OPT_OUT_WHEN_NO_TAG_MANAGER_CONSENT_IS_GIVEN
= 'executeCodeOptOutWhenNoTagManagerConsentIsGiven'
META_NAME_EXECUTE_PRIORITY
public
mixed
META_NAME_EXECUTE_PRIORITY
= 'executePriority'
META_NAME_GOOGLE_CONSENT_MODE_CONSENT_TYPES
public
mixed
META_NAME_GOOGLE_CONSENT_MODE_CONSENT_TYPES
= 'googleConsentModeConsentTypes'
META_NAME_IS_EMBEDDING_ONLY_EXTERNAL_RESOURCES
public
mixed
META_NAME_IS_EMBEDDING_ONLY_EXTERNAL_RESOURCES
= 'isEmbeddingOnlyExternalResources'
META_NAME_IS_PROVIDER_CURRENT_WEBSITE
public
mixed
META_NAME_IS_PROVIDER_CURRENT_WEBSITE
= 'isProviderCurrentWebsite'
META_NAME_LEGAL_BASIS
public
mixed
META_NAME_LEGAL_BASIS
= 'legalBasis'
META_NAME_PROVIDER
public
mixed
META_NAME_PROVIDER
= 'provider'
META_NAME_PROVIDER_CONTACT_EMAIL
public
mixed
META_NAME_PROVIDER_CONTACT_EMAIL
= 'providerContactEmail'
META_NAME_PROVIDER_CONTACT_LINK
public
mixed
META_NAME_PROVIDER_CONTACT_LINK
= 'providerContactLink'
META_NAME_PROVIDER_CONTACT_PHONE
public
mixed
META_NAME_PROVIDER_CONTACT_PHONE
= 'providerContactPhone'
META_NAME_PROVIDER_LEGAL_NOTICE_URL
public
mixed
META_NAME_PROVIDER_LEGAL_NOTICE_URL
= 'providerLegalNoticeUrl'
META_NAME_PROVIDER_PRIVACY_POLICY_URL
public
mixed
META_NAME_PROVIDER_PRIVACY_POLICY_URL
= 'providerPrivacyPolicyUrl'
META_NAME_TAG_MANAGER_OPT_IN_EVENT_NAME
public
mixed
META_NAME_TAG_MANAGER_OPT_IN_EVENT_NAME
= 'tagManagerOptInEventName'
META_NAME_TAG_MANAGER_OPT_OUT_EVENT_NAME
public
mixed
META_NAME_TAG_MANAGER_OPT_OUT_EVENT_NAME
= 'tagManagerOptOutEventName'
META_NAME_TECHNICAL_DEFINITIONS
public
mixed
META_NAME_TECHNICAL_DEFINITIONS
= 'technicalDefinitions'
META_NAME_UNIQUE_NAME
public
mixed
META_NAME_UNIQUE_NAME
= 'uniqueName'
SYNC_META_COPY
public
mixed
SYNC_META_COPY
= [\DevOwl\RealCookieBanner\settings\Cookie::META_NAME_UNIQUE_NAME, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_IS_PROVIDER_CURRENT_WEBSITE, \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_DATA_PROCESSING_IN_COUNTRIES, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_DATA_PROCESSING_IN_COUNTRIES_SPECIAL_TREATMENTS, \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_GOOGLE_CONSENT_MODE_CONSENT_TYPES, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_EXECUTE_PRIORITY, \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
public
mixed
SYNC_META_COPY_ONCE
= [\DevOwl\RealCookieBanner\settings\Cookie::META_NAME_PROVIDER, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_PROVIDER_CONTACT_PHONE, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_PROVIDER_CONTACT_EMAIL, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_PROVIDER_CONTACT_LINK, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_PROVIDER_PRIVACY_POLICY_URL, \DevOwl\RealCookieBanner\settings\Cookie::META_NAME_PROVIDER_LEGAL_NOTICE_URL]
SYNC_OPTIONS
public
mixed
SYNC_OPTIONS
= ['data' => ['menu_order'], 'taxonomies' => [\DevOwl\RealCookieBanner\settings\CookieGroup::TAXONOMY_NAME], 'meta' => ['copy' => \DevOwl\RealCookieBanner\settings\Cookie::SYNC_META_COPY, 'copy-once' => \DevOwl\RealCookieBanner\settings\Cookie::SYNC_META_COPY_ONCE]]
Properties
$cacheGetOrdered
private
mixed
$cacheGetOrdered
= []
$me
Singleton instance.
private
static Cookie
$me
= null
Methods
deregisterPostTypeCapToRoles()
Opposite of `registerPostTypeCapToRoles`.
public
static deregisterPostTypeCapToRoles(string $cptName) : mixed
Parameters
- $cptName : string
Tags
getAllCount()
Get a total count of all cookies.
public
getAllCount() : int
Return values
intgetInstance()
Get singleton instance.
public
static getInstance() : Cookie
Tags
Return values
CookiegetOrdered()
Get all available cookies ordered by group. You also get a `metas` property in the returned WP_Post instance with all RCB-relevant metas.
public
getOrdered(int $groupId[, bool $force = false ][, array<string|int, WP_Post> $usePosts = null ]) : array<string|int, WP_Post>|WP_Error
Parameters
- $groupId : int
- $force : bool = false
- $usePosts : array<string|int, WP_Post> = null
-
If set, only meta is applied to the passed posts
Return values
array<string|int, WP_Post>|WP_ErrorgetPluginConstantPrefix()
Get the prefix of this plugin so composer packages can dynamically build other constant values on it.
public
getPluginConstantPrefix() : string
Tags
Return values
stringgetPublicCount()
Get a total count of published cookies.
public
getPublicCount() : int
Return values
intgetServiceByIdentifier()
Get a created service by identifier.
public
getServiceByIdentifier(string $identifier) : mixed
Parameters
- $identifier : string
getServiceByUniqueName()
Get all available services by an unique name.
public
getServiceByUniqueName(string $slug) : mixed
Parameters
- $slug : string
getUnassignedCookies()
Get unassigned services (cookies without cookie group).
public
getUnassignedCookies() : mixed
register()
Register custom post type.
public
register() : mixed
rest_item_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.
public
rest_item_schema(array<string|int, mixed> $schema) : mixed
Parameters
- $schema : array<string|int, mixed>
__construct()
C'tor.
private
__construct() : mixed