upsidenl / wp-snippet-manager
Manage and insert categorized snippets into TinyMCE editor
Installs: 5
Dependents: 0
Suggesters: 0
Security: 0
Type:wordpress-plugin
pkg:composer/upsidenl/wp-snippet-manager
Requires
- php: >=8.0
This package is not auto-updated.
Last update: 2025-11-20 12:05:15 UTC
README
A WordPress plugin that allows you to manage and insert reusable text snippets into your content through a simple modal interface.
Description
WP Snippet Manager provides a centralized way to create, organize, and insert frequently-used text snippets into your posts, pages, and custom post types. The plugin integrates seamlessly with WordPress's TinyMCE editor and Advanced Custom Fields (ACF) WYSIWYG fields.
Features
- Custom Post Type: Manage all your text snippets as a custom post type (
default_text) in the WordPress admin - Category Organization: Organize snippets using subjects (categories) with the
default_text_subjecttaxonomy - TinyMCE Integration: Adds a snippet button to the WordPress classic editor toolbar
- ACF Integration: Works with ACF WYSIWYG fields with per-field control
- Search Functionality: Search through snippets by name or filter by category
- AJAX-Powered Modal: Fast, responsive modal interface for browsing and inserting snippets
- Secure: Nonce verification and capability checks for all AJAX operations
- Translation Ready: Includes Dutch (nl_NL) translation and POT file for other languages
Installation
- Upload the
wp-snippet-managerfolder to the/wp-content/plugins/directory - Activate the plugin through the 'Plugins' menu in WordPress
- Navigate to "Text snippets" in the WordPress admin menu to start creating snippets
Usage
Creating Snippets
- Go to Text snippets > Add new text in the WordPress admin
- Enter a title for your snippet (this will be displayed in the modal)
- Add your content in the editor (supports rich text and HTML)
- Optionally assign one or more subjects (categories) to organize your snippets
- Publish the snippet
Managing Subjects
Navigate to Text snippets > Subjects to create and organize snippet categories.
Inserting Snippets
In the WordPress Classic Editor:
- Click the snippet button in the TinyMCE toolbar (puzzle piece icon)
- Browse snippets by category or use the search box
- Select a snippet from the list
- Click "Insert Snippet" to add it to your content
In ACF WYSIWYG Fields:
- Enable the snippet button for specific WYSIWYG fields in the field settings:
- Edit the field group
- Find the WYSIWYG field
- Enable the "Snippet Button" option
- The snippet button will appear in the editor toolbar for that field
- Use the same process as above to insert snippets
Requirements
- WordPress 5.0 or higher
- PHP 7.0 or higher
- Optional: Advanced Custom Fields (for ACF integration)
ACF Integration
The plugin automatically detects ACF and adds a "Snippet Button" option to WYSIWYG field settings. This allows you to:
- Enable or disable the snippet button on a per-field basis
- Control which editors should have access to snippets
- Maintain a clean interface by only showing the button where needed