Skip to content
Corex

MaintenanceGuard

Corex\Config\Operations\MaintenanceGuard · class · Config layer

The safe public behaviour of Maintenance mode (spec 065): when the operations mode is maintenance, anonymous front-end visitors receive an accessible 503 maintenance notice — but any signed-in administrator (or admin/login/cron/AJAX/REST context) passes straight through, so the operator can never lock themselves out. It renames no WordPress core files. Public form submissions, which arrive over REST, are closed by {@see MaintenanceSubmissionGuard} (spec 112).

__construct(MaintenanceDecision $decision)

Section titled “__construct(MaintenanceDecision $decision)”

The branded Maintenance-mode page as a full, self-contained HTML document. {@see maybeBlock()} owns the headers and terminates the request.

The Maintenance card body. Pure of side effects and of asset access so the markup is unit-testable; {@see StandalonePage} wraps it in the branded document. get_bloginfo is feature-detected so the builder is safe to exercise headlessly.

Whether this request should be answered with the maintenance notice: Maintenance closes the site to the visitor ({@see MaintenanceDecision}) and the request is a normal front-end one. Pure of output, so it is testable.