Docs
Documentation
Everything FluentSnippets does, written down. Start at the beginning if you are new, or jump straight to the page you need.
Getting started
3 pages
Introduction What FluentSnippets is, how it stores your code, and what you get in the free plugin. Installation Three ways to install FluentSnippets, and what it creates on disk the first time it runs. Your first snippet Create, save and activate a snippet, and understand every field on the editor screen.
Writing snippets
6 pages
Snippet types and run locations The four types, every run location each one offers, and how priority orders snippets on the same hook. Functions (PHP) snippets Server-side PHP, the functions.php replacement, and the one hook-timing rule that catches people out. Content (PHP + HTML) snippets Print markup into the header, body, footer or around post content, mixing HTML and PHP freely. Styles (CSS) snippets Custom CSS for the front end, the admin and the block editor, inline or served as a real stylesheet. Scripts (JS) snippets JavaScript in the site or admin header and footer, printed inline or enqueued as a real file. Shortcodes Turn a Content snippet into a reusable shortcode, pass it attributes, and understand what it must return.
Controlling snippets
3 pages
Conditional logic Every condition source and operator, how AND and OR groups combine, and when conditions are evaluated. Organising snippets Groups, tags, search, sorting, the two list views, and the per-row actions. Import and export Move snippets between sites as JSON, build a reusable starter library, or copy the files directly.
Safety & recovery
3 pages
Error handling What happens when a snippet fatals, how the right snippet gets blamed, and how to bring it back. Safe Mode The kill switch. Turn every snippet off from a URL or from wp-config.php when you are locked out. Standalone mode Keep your snippets running from mu-plugins after the plugin is deactivated or deleted.
Reference
5 pages
How it works The storage directory, the generated index, and the exact sequence of a request. File format and headers The anatomy of a snippet file, every header key, and the rules if you edit one by hand. Constants and hooks Every PHP constant and every action and filter FluentSnippets exposes, with what each one is for. Permissions and security Which capabilities are needed to view, write and configure snippets, and how the storage directory is protected. Troubleshooting The problems people actually hit, with the cause and the fix for each.