snippets/get-snippet-status answers one question: are snippets running on this site at all?
Run it first when a snippet appears to have no effect. The cause is usually one of three things, and all three are here.
At a glance
| Ability | snippets/get-snippet-status |
| Toolset | WPCode — toolset/wpcode |
| Group | WPCode › Diagnostics |
| Requires | WPCode, active on the site |
| Capability | manage_options |
| Safety | Read-only — changes nothing |
| Repeatable | Idempotent — running it twice leaves the same result |
| Ships in | AcrossAI Abilities Manager 0.0.34 and later |
How it works
Safe mode suppresses every snippet at once. It is a WPCode setting meant for recovering a site a snippet broke, and it is easy to leave on after the recovery — at which point nothing runs and every individual snippet still looks perfectly healthy.
PHP snippets can be disabled site-wide, separately from safe mode. With that set, PHP and universal snippets do nothing while CSS and HTML ones carry on working, which produces the confusing symptom of some snippets working and some not.
And the cache can disagree with the database. The response reports the active count and the cached count side by side, plus a cache_in_sync flag — because a mismatch means the admin screen and reality have come apart, usually after something wrote the snippets table directly.
The error count is the fourth number worth having: snippets WPCode switched off after a fatal, which look deliberate unless you know to check.
Input
This ability takes no input.
What comes back
| Name | Type | What it is |
|---|---|---|
safe_mode | boolean | Whether safe mode is suppressing every snippet. |
php_disabled | boolean | Whether PHP snippets are disabled site-wide. |
total | integer | How many snippets exist. |
active | integer | How many are marked active. |
cached | integer | How many the loader cache holds. |
with_errors | integer | How many have a recorded error. |
cache_in_sync | boolean | Whether the cache matches the database. |
wpcode_version | string | The installed WPCode version. |
success | boolean | Whether the call completed. |
message | string | A one-line summary of what happened, suitable for showing a human. |
error_code | string | Present only on failure — a stable machine-readable reason, such as a missing field, a wrong field type or an unmet confirmation. |
Example
Ask your assistant:
None of our code snippets seem to be doing anything.
It resolves to one call:
{
"ability": "snippets/get-snippet-status",
"parameters": {}
}Worth knowing
- Safe mode explains a site where nothing runs.
- The PHP setting explains a site where some things run and some do not.
cache_in_syncfalse explains a site where the admin and the front end disagree.- A non-zero error count usually means WPCode switched something off for you.
Related abilities
- List Snippet Errors — what was switched off and why
- List Code Snippets — the per-snippet view
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category