WP Manifestindependent plugin directory
manifest / developer / sm-snippets

SM Snippets

A local, boring-in-the-best-way snippet manager for WordPress.

by Mo Shehu · github.com/shehuphd/sm-snippets · website

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/shehuphd/sm-snippets/archive/refs/heads/main.zip

Declares an update source (https://github.com/shehuphd/sm-snippets), so updates arrive through the plugin's own updater.

Readme

SM Snippets

A local, boring-in-the-best-way snippet manager for WordPress.

Why

SM Snippets stores snippets in your own WordPress database and runs them where you tell it to. Everything happens on your own site, from one admin screen: paste the code, choose a placement and targeting rules, and activate it.

Quick start

  1. Download the latest release ZIP from GitHub, or zip the sm-snippets folder yourself.
  2. In WordPress, go to Plugins, Add New, Upload Plugin, and upload the ZIP.
  3. Activate it, then open the new SM Snippets menu in the admin sidebar.
  4. Click Add New, paste a snippet, pick a placement, tick Active, and save. It runs on the next page load.

To confirm it works in seconds: add an HTML snippet with `, placement "Site head", set it Active, then view your homepage source. The comment appears inside`.

What it does

  • Runs HTML, CSS, JavaScript, and PHP snippets in eight placements, from wp_head to a shortcode.
  • Targets by page mode, URL path, post ID, post type, login state, and environment, with an admins-only testing switch.
  • Pauses everything with one click (safe mode), a constant, or a URL parameter.
  • Imports JSON exports from other snippet plugins through a review screen, with everything paused by default.
  • Keeps the last 20 revisions of each snippet.
  • Updates itself from this repository's GitHub releases through the standard WordPress updates screen.

The full manual is in USAGE.md. The internals are described in ARCHITECTURE.md. Changes per release are in CHANGELOG.md.

License

GPL-2.0-or-later.

By Mo Shehu

Read the full README on GitHub →