Limited-time launch offer 20% off Pro — first payment and every renewal — with code See pricing

Module — 18 operations

Code (Pro)

Snippets, site-wide CSS and JS, and widget, block and theme-template scaffolds — with the recovery path built before the feature.

Needs: SiteHelm Pro on a licensed site. The module ships switched off, and storing code and running code are two separate switches.

Cue 2 — first light

Before you call anything here

Note 1

Every snippet is written inactive. Activating one runs a health check the moment it goes live — if the site stops rendering, the snippet is reverted automatically and quarantined, and an unconfirmed activation deactivates itself.

Note 2

Snippets never load on SiteHelm’s own endpoint, so the channel used to remove a broken snippet keeps working even when the snippet takes the front end down. A one-request safe-mode flag skips every snippet on the way into wp-admin.

Note 3

The scaffold operations return full class source as text and store nothing. Generating code and storing code are separate acts.

Note 4

Where a change touches a code field, the activity log records a byte count and a digest, never the body — a snippet holding an API key stays a secret even in the audit trail.

Reads — 9

What it can tell you

A read still asks WordPress for a capability against the object. There is no anonymous read anywhere in the surface.

code-host-list

system-read

Lists the places a snippet can live — SiteHelm's own runner, always present, and any snippet plugin that is installed — and which safety guarantees each can keep

needs manage_options

Read
code-snippet-list

system-read

Lists the stored snippets with language, hook, whether each is live and whether it is quarantined; bodies are not returned

needs manage_options

Read
code-snippet-get

system-read

Reads one snippet in full, including its body

needs manage_options

Read
code-quarantine-list

system-read

Lists the snippets taken out of circulation because a request died while they were running, with the error that did it

needs manage_options

Read
code-health-check

system-read

Fetches the home page and the login screen and reports whether each renders, breaks, or could not be reached — the same check activation runs, callable on its own

needs manage_options

Read
code-safe-mode-token

system-read

Issues the one-off URL that loads the site with every snippet skipped, so the admin stays reachable while a snippet is breaking the front end

needs manage_options

Read
code-scaffold-widget

system-read

Generates the source for an Elementor widget class from a description of its controls and returns it as text; nothing is stored and nothing runs

needs manage_options

Read
code-scaffold-block

system-read

Generates the source for a WordPress block — registration, attributes, render callback — as text; nothing is stored and nothing runs

needs manage_options

Read
code-scaffold-theme-template

system-read

Generates the source for a theme template file for a post type or archive, as text; nothing is stored and nothing runs

needs manage_options

Read
Writes — 9

What it can change

Every one of these is previewed before it runs, snapshotted before it changes anything, and verified afterwards by reading the site back. The chips are the policies the operation itself declares.

code-snippet-write

content-write

Stores one PHP snippet — always stored switched off, no argument makes it live, and refused outright if it does not lex; name WPCode or Code Snippets as the host and it is stored there instead, where only that plugin can switch it on

needs manage_options + edit_plugins re-checked

write risk rollback required
code-snippet-activate

content-write

Switches one stored snippet on under the guard: health-checked immediately, auto-reverted and quarantined if the site stops rendering, and self-deactivating unless confirmed inside the window

needs manage_options + edit_plugins re-checked

write risk rollback required
code-snippet-confirm

content-write

Confirms that a snippet activated a moment ago should stay live — staying on is not the default, switching back off is

needs manage_options + edit_plugins re-checked

write risk rollback required
code-snippet-deactivate

content-write

Switches one snippet off; only ever reduces what runs

needs manage_options + edit_plugins re-checked

write risk rollback required
code-snippet-delete

content-write

Deletes one snippet, snapshotted first so it can be put back

needs manage_options + edit_plugins re-checked

write risk rollback required
code-css-write

content-write

Stores custom CSS printed on the front end — it cannot run anything, but it can make a site unusable to look at, so it is previewed and reversible like any other change; WPCode and Code Snippets can hold it instead

needs manage_options + edit_plugins re-checked

write risk rollback required
code-js-write

content-write

Stores custom JavaScript printed on the front end — it runs in every visitor's browser, a wider reach than PHP, and goes through the same storage discipline; WPCode and Code Snippets can hold it instead

needs manage_options + edit_plugins re-checked

write risk rollback required
code-safe-mode-set

content-write

Turns every snippet off at once, or back on, without knowing which one broke; the switch is read before any snippet is considered, so a broken snippet cannot defeat it

needs manage_options + edit_plugins re-checked

write risk rollback required
code-quarantine-clear

content-write

Puts a quarantined snippet back into circulation — through the whole activation guard again, not on trust

needs manage_options + edit_plugins re-checked

write risk rollback required
Cue 5 — day

Keep reading