CreaCaptcha

interceptor-inject.php

Auto-injects the ALTCHA widget into every <form> on pages matching the configured inject paths.

Table of Contents

Functions

creationell_captcha_interceptor_inject_buffer_start()  : void
Conditionally starts the output buffer on template_redirect priority 0.
creationell_captcha_interceptor_inject_buffer()  : string
Buffer callback. Replaces every `<form …>…</form>` with the same form plus an `<altcha-widget>` inserted directly before `</form>`. Idempotent — forms that already contain `<altcha-widget` are returned unchanged.

Functions

creationell_captcha_interceptor_inject_buffer_start()

Conditionally starts the output buffer on template_redirect priority 0.

creationell_captcha_interceptor_inject_buffer_start() : void

The buffer only runs when (a) the master interceptor toggle is on, (b) at least one inject path is configured, AND (c) the current request path matches that pattern list. On non-matching pages the request is unaffected.

creationell_captcha_interceptor_inject_buffer()

Buffer callback. Replaces every `<form …>…</form>` with the same form plus an `<altcha-widget>` inserted directly before `</form>`. Idempotent — forms that already contain `<altcha-widget` are returned unchanged.

creationell_captcha_interceptor_inject_buffer(string $html) : string
Parameters
$html : string

Full page HTML.

Return values
string

        
On this page

Search results