Constants

MANAGE_MIN_CAPABILITY

MANAGE_MIN_CAPABILITY ='manage_options'

The minimal required capability so a user can manage cookies.

Properties

$updater

$updater :

The updater instance.

Type

$plugin_data

$plugin_data :

The stored plugin data.

Type

$activator

$activator :

The plugins activator class.

Type

$assets

$assets :

The plugins asset class.

Type

$service

$service :

The utils service class.

Type

$pageRequestUuid4

$pageRequestUuid4 :string

An unique id for this page request. This is e. g. needed for unique overlay id.

Type

string

$compLanguage

$compLanguage :\DevOwl\Multilingual\AbstractLanguagePlugin

See AbstractLanguagePlugin.

Type

\DevOwl\Multilingual\AbstractLanguagePlugin

Methods

overrideConstruct()

overrideConstruct()

overrideRegisterSettings()

overrideRegisterSettings()

overrideRegisterPostTypes()

overrideRegisterPostTypes()

overrideInit()

overrideInit()

createProCookiePresets()

createProCookiePresets(array  $result)

Create PRO-specific cookie presets.

Parameters

array $result

createProBlockerPresets()

createProBlockerPresets(array  $result)

Create PRO-specific blocker presets.

Parameters

array $result

overrideInitCustomize()

overrideInitCustomize()

This method should be called in your 'init' action through your core.

getPluginConstantPrefix()

getPluginConstantPrefix(): string

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

Returns

string

i18n()

i18n()

Define constants which relies on i18n localization loaded.

updateDbCheck()

updateDbCheck()

Updates the database version in the options table.

It also installs the needed database tables.

getInternalPackages()

getInternalPackages(): object

Get a list of internal packages (our own, symlinked from the monorepo).

Returns

object

getPluginData()

getPluginData(string  $key = null): array<mixed,string>|string|null

Gets the plugin data.

Parameters

string $key

The key of the data to return

Returns

array<mixed,string>|string|null

versionCompareOlderThan()

versionCompareOlderThan(string|false  $installed,string  $version,array<mixed,string>  $allowedPrerelease = array(),callable  $prereleaseAdditionalCheck = null)

Checks if a previously installed version is lower than an expected version.

Additionally, we can check for a prerelease version, too. The $allowedPrerelease needs to be an array (e.g. ["2.15.1", "2.16.0"]), and if the installed version is a prerelease (e.g. 2.15.1-9507), the version 2.15.1 gets extracted and checked for existence in the array.

Usage with $prereleaseAdditionalCheck: You can pass an additional callback which is executed before returning true when a prerelease got found. An example scenario for this callable is to check for a specific database table if you drop a column. Why is this needed? Imagine you are sending multiple prerelease to a customer.

Parameters

string|false $installed
string $version
array<mixed,string> $allowedPrerelease
callable $prereleaseAdditionalCheck

($prereleaseVersion, $prereleaseCiIid) => boolean

registerSettings()

registerSettings()

Register settings.

registerPostTypes()

registerPostTypes()

Register post types and custom taxonomies.

init()

init()

The init function is fired even the init hook of WordPress. If possible it should register all hooks to have them in one place.

customize_save_response()

customize_save_response(array  $response)

Check if any plugin specific setting got changed in customize.

Parameters

array $response

queryArguments()

queryArguments(array  $arguments,string  $context)

See filter RCB/Query/Arguments.

Parameters

array $arguments
string $context

getBaseAssetsUrl()

getBaseAssetsUrl(string  $path)

Return the base URL to assets specially for Real Cookie Banner.

Parameters

string $path

getConfigPage()

getConfigPage()

Get config page.

getBanner()

getBanner()

Get banner.

getBlocker()

getBlocker()

Get blocker.

getPageRequestUuid4()

getPageRequestUuid4()

Get request uuid 4.

getCompLanguage()

getCompLanguage()

Get compatibility language class.

getAdInitiator()

getAdInitiator()

Get ad initiator from `real-utils`.

getRpmInitiator()

getRpmInitiator()

Get ad initiator from `real-product-manager-wp-client`.

getAnonymousAssetBuilder()

getAnonymousAssetBuilder()

Getter.

getTcfVendorListNormalizer()

getTcfVendorListNormalizer()

Getter.

getExcludeAssets()

getExcludeAssets()

Getter.

getScanner()

getScanner()

Getter.

getRealQueue()

getRealQueue()

Getter.

isLicenseActive()

isLicenseActive()

Check if a license is active.

__construct()

__construct()

Application core constructor.

The constructor is protected because a factory method should only create a Core object.

construct()

construct()

The constructor handles the core startup mechanism.

The constructor is protected because a factory method should only create a Core object.