Constants

COMPONENT_ID

COMPONENT_ID =RCB_SLUG . '-component'

CHECKLIST_OVERDUE

CHECKLIST_OVERDUE ='+1 week'

OPTION_NAME_NEXT_PRO_NOTICE

OPTION_NAME_NEXT_PRO_NOTICE =RCB_OPT_PREFIX . '-config-next-pro-notice'

NEXT_PRO_NOTICE

NEXT_PRO_NOTICE =60 * 60 * 24 * 30

ADMIN_BAR_TOP_LEVEL_NODE_ID

ADMIN_BAR_TOP_LEVEL_NODE_ID ='rcb-top-node'

TRANSIENT_SERVICES_WITH_EMPTY_PRIVACY_POLICY

TRANSIENT_SERVICES_WITH_EMPTY_PRIVACY_POLICY =RCB_OPT_PREFIX . '-services-with-empty-privacy-policy'

Methods

getPluginConstantPrefix()

getPluginConstantPrefix(): string

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

Returns

string

admin_notices_services_with_empty_privacy_policy()

admin_notices_services_with_empty_privacy_policy()

Create an admin notice for services without privacy policy set.

admin_notices_preinstalled_environment()

admin_notices_preinstalled_environment()

Creates an admin notice for preinstalled environments.

admin_notices_ad_blocker()

admin_notices_ad_blocker()

Creates an admin notice in the settings page if an ad-blocker got detected.

admin_menu()

admin_menu()

Add new menu page.

plugin_action_links()

plugin_action_links(array<mixed,string>  $actions): array<mixed,string>

Show a "Settings" link in plugins list.

Parameters

array<mixed,string> $actions

Returns

array<mixed,string>

render_component_library()

render_component_library()

Render the content of the menu page.

isVisible()

isVisible(string  $hook_suffix = false)

Check if a given page string is this config page or from the current page `pagenow`.

Parameters

string $hook_suffix

The current admin page (admin_enqueue_scripts)

isProNoticeVisible()

isProNoticeVisible(boolean  $dismiss = null)

Check if the Pro notice should be shown. See `proHeadlineButton.tsx`.

Parameters

boolean $dismiss

If true, notice will be dismissed

getUrl()

getUrl()

Get the URL of this page.

ensureAdminBarTopLevelNode()

ensureAdminBarTopLevelNode()

Create the top menu admin bar for "Real Cookie Banner" and return the `parent` id so you can add additional drop down menus.

getIconAsSvgBase64()

getIconAsSvgBase64(string  $color = '#9ea3a8')

Get the Real Cookie Banner logo as SVG icon in base64 format.

Parameters

string $color

getIconAsSvgSpan()

getIconAsSvgSpan(string  $color = '#9ea3a8',string  $additionalStyle = '')

Get the Real Cookie Banner logo as SVG icon in base64 format within a `<span>`.

Parameters

string $color
string $additionalStyle

instance()

instance()

New instance.

__construct()

__construct()

C'tor.