Documentation

DashboardTileMigrationMajor3 extends AbstractDashboardTileMigration
in package

Migration for Major version 3.

Tags
see
https://app.clickup.com/t/2fjk49z

Table of Contents

Constants

DELETE_LANGUAGES  = ['de', 'en']
DELETE_OPTIONS_TEXTS  = [\DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_HEADLINE, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_DESCRIPTION, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_DATA_PROCESSING_IN_UNSAFE_COUNTRIES, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_AGE_NOTICE, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_AGE_NOTICE_BLOCKER, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_LIST_SERVICES_NOTICE, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_CONSENT_FORWARDING, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_ACCEPT_ALL, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_ACCEPT_ESSENTIALS, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_ACCEPT_INDIVIDUAL, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_POWERED_BY_TEXT, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_BLOCKER_HEADLINE, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_BLOCKER_LINK_SHOW_MISSING, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_BLOCKER_LOAD_BUTTON, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_BLOCKER_ACCEPT_INFO, \DevOwl\RealCookieBanner\view\customize\banner\individual\Texts::SETTING_HEADLINE, \DevOwl\RealCookieBanner\view\customize\banner\individual\Texts::SETTING_DESCRIPTION, \DevOwl\RealCookieBanner\view\customize\banner\individual\Texts::SETTING_SAVE, \DevOwl\RealCookieBanner\view\customize\banner\individual\Texts::SETTING_SHOW_MORE, \DevOwl\RealCookieBanner\view\customize\banner\individual\Texts::SETTING_HIDE_MORE]
OPTION_NAME_CLICKED_ACTIONS  = RCB_OPT_PREFIX . '-migration-actions-clicked'
TRANSIENT_CACHE_KEY_BLOCKERS_WITH_BETTER_POTENTIAL_VISUAL_TYPE  = RCB_OPT_PREFIX . '-blockers-with-better-potential-visual-type'

Properties

$actions  : mixed
A set of actions which can be made within this migration.
$id  : mixed

Methods

__construct()  : mixed
C'tor. Register your actions with `$this::addAction` here!
actions()  : void
`addAction()` your actions here.
addAction()  : mixed
Register a new action which can be made for this migration.
applyMobileOptimizations()  : mixed
Start the scanner and redirect to scanner tab.
applyNewGroupTexts()  : mixed
Upgrade the group texts for a list of languages.
applyNewTextsAndImportantDesignChanges()  : mixed
Apply new customizer texts and important design changes and overwrite existing ones.
deleteCustomizerTexts()  : array<string|int, string>
Delete customizer texts for given languages and option keys.
dismiss()  : bool
Dismiss this migration.
doAction()  : mixed
Start a given migration by ID.
doDismiss()  : mixed
Dismiss a migration by ID.
doRegisterActions()  : mixed
Register all actions with `AbstractDashboardTileMigration#actions()` method.
getConfigUrl()  : mixed
Get a config URL pointing to a given route (react-router).
getDescription()  : string
Get a description for this migration.
getHeadline()  : string
Get a headline for this migration.
getId()  : string
Get a unique id for this migration.
getPluginConstantPrefix()  : string
Get the prefix of this plugin so composer packages can dynamically build other constant values on it.
hasMajorPreviouslyInstalled()  : mixed
Check if a given major version was previously installed.
init()  : mixed
Initialize hooks and listen to saves to content blockers so we can update the transient of `fetchBlockersWithBetterPotentialVisualType`.
isActive()  : bool
Check if this migration is active.
removeMajorVersionFromPreviouslyInstalled()  : mixed
Dismiss the migration by removing a major version from the previously installed versions.
revisionCurrent()  : mixed
Get the migration as plain array so it can be consumed in the frontend.
save_post_blocker()  : mixed
A blocker was saved.
saveActionPerformed()  : mixed
Save an action as "performed" so we can show this in the UI.
scanWebsiteAgain()  : mixed
Start the scanner and redirect to scanner tab.
applyNewGroupTextsForLanguage()  : mixed
Upgrade the group texts for a given language.
fetchBlockersWithBetterPotentialVisualType()  : array<string|int, string>
Calculate existing blockers with potential visual type other than `default` from the templates and cache the result to a transient to avoid the calculation again.

Constants

DELETE_OPTIONS_TEXTS

public mixed DELETE_OPTIONS_TEXTS = [\DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_HEADLINE, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_DESCRIPTION, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_DATA_PROCESSING_IN_UNSAFE_COUNTRIES, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_AGE_NOTICE, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_AGE_NOTICE_BLOCKER, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_LIST_SERVICES_NOTICE, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_CONSENT_FORWARDING, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_ACCEPT_ALL, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_ACCEPT_ESSENTIALS, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_ACCEPT_INDIVIDUAL, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_POWERED_BY_TEXT, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_BLOCKER_HEADLINE, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_BLOCKER_LINK_SHOW_MISSING, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_BLOCKER_LOAD_BUTTON, \DevOwl\RealCookieBanner\view\customize\banner\Texts::SETTING_BLOCKER_ACCEPT_INFO, \DevOwl\RealCookieBanner\view\customize\banner\individual\Texts::SETTING_HEADLINE, \DevOwl\RealCookieBanner\view\customize\banner\individual\Texts::SETTING_DESCRIPTION, \DevOwl\RealCookieBanner\view\customize\banner\individual\Texts::SETTING_SAVE, \DevOwl\RealCookieBanner\view\customize\banner\individual\Texts::SETTING_SHOW_MORE, \DevOwl\RealCookieBanner\view\customize\banner\individual\Texts::SETTING_HIDE_MORE]

TRANSIENT_CACHE_KEY_BLOCKERS_WITH_BETTER_POTENTIAL_VISUAL_TYPE

public mixed TRANSIENT_CACHE_KEY_BLOCKERS_WITH_BETTER_POTENTIAL_VISUAL_TYPE = RCB_OPT_PREFIX . '-blockers-with-better-potential-visual-type'

Properties

Methods

addAction()

Register a new action which can be made for this migration.

public addAction(string $id, string $title, string $description[, array<string|int, mixed> $args = [] ]) : mixed

Arguments:

  • [linkText] (string) Can be null to disable the link
  • [linkClasses="button"] (string) Class name for the button
  • [linkDisabled] (boolean|"performed") Disable the action link
  • [performed] (boolean) Force to show "Already applied!"
  • [performedLabel] (string) Change the text of "Already applied!"
  • [needsPro] (boolean) The action is only available in PRO version
  • [confirmText] (string) The user needs to confirm this migration with something like "Are you sure?"
  • [callback] (callback|string) Can be null, a callback which is executed when clicking the link or a direct URL
  • [previewImage] (string) Absolute URL to preview image
  • [info] (string) Show an additional info notice
Parameters
$id : string

Unique action ID

$title : string
$description : string
$args : array<string|int, mixed> = []

Arguments, see above

applyMobileOptimizations()

Start the scanner and redirect to scanner tab.

public applyMobileOptimizations(array<string|int, mixed> $result) : mixed
Parameters
$result : array<string|int, mixed>

applyNewGroupTexts()

Upgrade the group texts for a list of languages.

public applyNewGroupTexts(array<string|int, string> $deleteLanguages) : mixed
Parameters
$deleteLanguages : array<string|int, string>
Tags
deprecated

Use Reset#texts() instead

applyNewTextsAndImportantDesignChanges()

Apply new customizer texts and important design changes and overwrite existing ones.

public applyNewTextsAndImportantDesignChanges(array<string|int, mixed> $result) : mixed
Parameters
$result : array<string|int, mixed>

deleteCustomizerTexts()

Delete customizer texts for given languages and option keys.

public deleteCustomizerTexts(array<string|int, string>|null $languages, array<string|int, string> $ids) : array<string|int, string>
Parameters
$languages : array<string|int, string>|null

Pass null to delete all languages

$ids : array<string|int, string>
Tags
deprecated

Use Reset#texts() instead

Return values
array<string|int, string>

Deleted option keys

doAction()

Start a given migration by ID.

public static doAction(string $migrationId, string $actionId) : mixed
Parameters
$migrationId : string
$actionId : string

doRegisterActions()

Register all actions with `AbstractDashboardTileMigration#actions()` method.

public static doRegisterActions() : mixed

getConfigUrl()

Get a config URL pointing to a given route (react-router).

public getConfigUrl(string $route) : mixed
Parameters
$route : string

getPluginConstantPrefix()

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

public getPluginConstantPrefix() : string
Tags
codeCoverageIgnore

It only returns a string with the constant prefix

Return values
string

hasMajorPreviouslyInstalled()

Check if a given major version was previously installed.

public hasMajorPreviouslyInstalled(int $majorVersion) : mixed
Parameters
$majorVersion : int

init()

Initialize hooks and listen to saves to content blockers so we can update the transient of `fetchBlockersWithBetterPotentialVisualType`.

public init() : mixed

removeMajorVersionFromPreviouslyInstalled()

Dismiss the migration by removing a major version from the previously installed versions.

public removeMajorVersionFromPreviouslyInstalled(int $majorVersion) : mixed
Parameters
$majorVersion : int

revisionCurrent()

Get the migration as plain array so it can be consumed in the frontend.

public revisionCurrent(array<string|int, mixed> $array) : mixed
Parameters
$array : array<string|int, mixed>

save_post_blocker()

A blocker was saved.

public save_post_blocker(int $post_ID, WP_Post $post, bool $update) : mixed
Parameters
$post_ID : int
$post : WP_Post
$update : bool

saveActionPerformed()

Save an action as "performed" so we can show this in the UI.

public saveActionPerformed(string $id) : mixed
Parameters
$id : string

scanWebsiteAgain()

Start the scanner and redirect to scanner tab.

public scanWebsiteAgain(array<string|int, mixed> $result) : mixed
Parameters
$result : array<string|int, mixed>

applyNewGroupTextsForLanguage()

Upgrade the group texts for a given language.

protected applyNewGroupTextsForLanguage(array<string|int, string> $deleteLanguages, string $locale) : mixed
Parameters
$deleteLanguages : array<string|int, string>
$locale : string
Tags
deprecated

Use Reset#texts() instead

fetchBlockersWithBetterPotentialVisualType()

Calculate existing blockers with potential visual type other than `default` from the templates and cache the result to a transient to avoid the calculation again.

protected fetchBlockersWithBetterPotentialVisualType() : array<string|int, string>
Return values
array<string|int, string>

        
On this page

Search results