/
/
Snippets
Free
Admin Tools
Customization

Snippets

Version 2.26.2 · Updated 18 Nov 2026

Write PHP, JS, CSS and raw HTML from wp-admin, sandboxed so a bad snippet can’t take the site down, and drivable by AI over MCP.

Free with the Hub. One switch on the Hub’s Add-ons screen.

codicts-snippets cover image

Overview

What it does

Snippets is a proper code manager for WordPress: PHP, JavaScript, CSS and raw HTML, all written from one admin page and filed into a nested, drag-and-drop folder tree. Point each one at the frontend, the admin, both, a single page or a whole post type, and decide exactly where and when it runs.

The best part: PHP snippets can’t take your site down. Every save gets syntax-checked, scanned for dangerous calls, and run once in a throwaway sandbox before it goes anywhere near your live site. If it fatals, the snippet gets flagged and benched instead of white-screening your homepage. There’s even a shutdown handler for the nasty compile-level errors that slip past a normal try/catch.

On the frontend it’s quick. Active snippets compile into a single manifest that loads with zero database queries, and it regenerates itself whenever you save, toggle or delete. Got a whole team in there at once? A live editing layer shows who’s touching what, locks the snippet they’re on, and offers a polite takeover when you really need it.

There’s also a built-in MCP server, so an AI client like Claude Code can list, read, write, organise and toggle your snippets for you. Everything behind it needs admin rights, so it stays your code, not everyone’s.

With the Codicts Hub Lab, Ask the Lab turns a sentence into a snippet. Have one open and it changes that one instead: “only run this on the home page” is all it takes.

What you get

  • Manage PHP, JavaScript, CSS and raw HTML snippets from a single admin page.
  • Nested, drag-and-drop folder tree with search by title, content, or snippet ID, and context menus.
  • Target the frontend, admin, both, specific pages, or specific post types, with header/body/footer placement and per-snippet priority.
  • Sandboxed PHP validation: a syntax check, a dangerous-function scan, and an isolated test run catch errors before they reach the live site.
  • Fatal-error isolation via a shutdown handler and a .fatal marker file, so compile-level errors that bypass try/catch still get caught.
  • Manifest-based frontend caching: zero database queries on a normal page load, auto-regenerated on save, toggle, or delete.
  • Multi-user editing protection with live indicators, avatars, folder locks, and a takeover modal (optional WordPress Heartbeat integration).
  • Import/export, plus Elementor per-element CSS snippets with live preview.
  • REST API (codicts-snippets/v1) for full snippet CRUD, site context, and targeting options.
  • Built-in MCP server (/mcp) exposing snippet management to AI clients, with an in-app AI Snips panel showing copy-paste connection details.
  • Revisions: every save keeps a copy (the newest 20 per snippet), with who saved it, what changed, and a one-click Load into editor.
  • Ask the Lab (with the Codicts Hub Lab): describe a new snippet, or a change to the one that is open, and the Lab writes it. The Lab also knows how snippets work, from the same guide the MCP server gives AI clients.
  • Works on phones: the list and the editor take turns on a small screen.
  • Admin-bar shortcut and Hub settings-URL registration.

Screens

A closer look

Changelog

What’s new

Version 2.26.2 · 18 Nov 2026
  • Fixed: read-only checks refuse more hidden ways out: writing files, mail and web requests through other routes, and reading secrets in disguise.
  • Changed: Deleting a snippet or folder, and leaving a snippet with unsaved changes now ask first in our own dialog, not the browser’s pop-up.
  • Changed: every Snippets pop-up (Import, Export and the rest) is now the Hub’s own dialog, and an error message is never blank. Every tooltip and scrollbar is the Hub’s own, and Snippets no longer loads Bootstrap’s script. Needs Codicts Hub 2.8.0.
  • New: read-only checks for troubleshooting. Run PHP once to find out why something on your site is not working: nothing is saved or switched on, every database write is refused and rolled back, and mail and web requests are blocked. AI assistants get it over MCP as run_readonly_check, and the Codicts Hub Lab as run_check.
  • New: the Lab can run {C} Snippets for you: names, folders and order, where each snippet runs, duplicates, import and export, revisions and the sandbox check, from a chat.
  • Fixed: a duplicated or imported snippet lost every backslash in its code, breaking namespaces and regexes.
  • New: revisions. Every save keeps a copy, the newest 20 per snippet, with who saved it, when, and whether its check passed. The clock in the toolbar opens them: what each save changed, its code and settings, and Load into editor. Clicking a PHP error opens its whole story there.
  • New: Ask the Lab. Describe a snippet and the Codicts Hub Lab writes it, or have one open and it changes that one instead; a switch in its window picks which. Coming back, the open snippet reloads with the new code, or warns you first if you had unsaved edits.
  • The Lab knows how snippets work: its chats read the same guide the MCP server gives AI clients, so it always matches your version of Snippets.
  • Works on phones: the list and the editor take turns, with a Back to snippets button, and the toolbar fits.
  • Tooltips match the rest of the Hub, coloured for errors, warnings and success.
  • Fixed: the busy Save button’s loader sat off-centre.
  • Needs Codicts Hub 2.0.0.
codicts-snippets featured image

Snippets

Version
2.26.2
Last updated
18 Nov 2026
Works with
Any WordPress site
Needs
Codicts Hub 2.8.0 · PHP 7.4+
Category
Admin Tools

Published by

Codicts

Made by Codicts

Free with the Hub. One switch on the Hub’s Add-ons screen.

Reviews

What people say

Reviews are written by customers with an active license. Sign in

Explore

More in Admin Tools

codicts-voxel-whitelabeler featured image
Pro

By Codicts

Run a fleet of whitelabeled partner sites off one Voxel install, each with its own domain, branding, content, and users.

Admin Tools
Elementor
Requires Voxel
codicts-voxel-licenser featured image
Pro

By Codicts

Turns a completed Voxel order into a license key, then decides who gets to download and update what you sell.

Admin Tools
API & Integrations
Requires Voxel
codicts-admin-columns featured image
Pro
v2.0.10

By Codicts

Rebuild the WordPress list-table columns per post type: reorder, rename, resize, add, and remove, from one drag-and-drop page.

Admin Tools
codicts-voxel-tickets featured image
Pro
v2.5.0

By Codicts

QR-code tickets for your Voxel orders: generated at checkout, emailed to the buyer, and scanned at the door.

Admin Tools
Bookings
Requires Voxel

Got a feature in mind? Just ask.

Download the Hub, open the Lab, start typing.