CreaCaptcha

upgrade.php

Version-gated upgrade routine.

Table of Contents

Functions

creationell_captcha_maybe_upgrade()  : void
Runs schema migrations when the stored version differs from the running one.
creationell_captcha_migrate_widget_mode()  : void
Migrates the legacy `widget_mode` setting (Modul 11a) to the new `widget_display` + `widget_auto_trigger` pair (Modul 14). Idempotent — if `widget_display` is already present in the stored option, the migration is skipped.

Functions

creationell_captcha_maybe_upgrade()

Runs schema migrations when the stored version differs from the running one.

creationell_captcha_maybe_upgrade() : void

Hooked on admin_init. When the event-log table already exists it is re-run through dbDelta so new columns are added; a missing table is left alone — it is created on demand when the event log is switched on.

creationell_captcha_migrate_widget_mode()

Migrates the legacy `widget_mode` setting (Modul 11a) to the new `widget_display` + `widget_auto_trigger` pair (Modul 14). Idempotent — if `widget_display` is already present in the stored option, the migration is skipped.

creationell_captcha_migrate_widget_mode() : void

Mapping: visible → widget_display=standard, widget_auto_trigger=none auto → widget_display=invisible, widget_auto_trigger=onload overlay → widget_display=floating, widget_auto_trigger=onsubmit

The legacy widget_mode key is removed from the option once the new keys are in place.


        
On this page

Search results