=== SnipCraft ===
Contributors: wpdreams
Tags: code snippets, snippets, modules, php, css
Requires at least: 6.2
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Manage PHP, CSS, JavaScript & HTML snippets and multi-part modules, with an optional cloud library of ready-made code.

== Description ==

SnipCraft manages code snippets and multi-part modules on your WordPress site, with a built-in code editor and an optional, opt-in cloud library of ready-made solutions.

* Manage PHP, CSS, JavaScript and HTML snippets, plus multi-part modules.
* A built-in code editor with syntax highlighting, autocomplete and inline linting (CodeMirror 6).
* Conditional loading — show a snippet by URL, login state or user role — and head/footer placement.
* Organize snippets into folders, and import or export them as JSON.
* One-click no-code generators for common snippets (redirects, custom post types, header/footer scripts, and more).
* A security scanner that warns about risky PHP before you enable it.
* A run debugger in the admin bar showing which snippets ran on a page.
* An optional, opt-in cloud library of ready-made snippets — nothing is sent to the cloud without your consent.

== Installation ==

1. Upload the `snipcraft` folder to `/wp-content/plugins/`, or install it from your dashboard via Plugins → Add New.
2. Activate the plugin through the Plugins menu in WordPress.
3. Open SnipCraft from the admin menu and create your first snippet.

== Frequently Asked Questions ==

= Which snippet types can I manage? =

PHP, CSS, JavaScript and HTML, plus multi-part modules that group several pieces of code together.

= Do I need an account? =

No. SnipCraft works fully without an account. The cloud library and any cloud sync are optional and opt-in — nothing is sent to the cloud until you explicitly connect and consent.

= Can I control where and when a snippet runs? =

Yes. Each snippet can be conditionally loaded by URL, login state or user role, and assets can be placed in the page head or footer.

= Is running PHP snippets safe? =

PHP execution is self-contained and stays on your own site. A built-in security scanner warns about risky patterns before you enable a snippet, and a Safe Mode lets you recover if a snippet ever misbehaves.

== External services ==

SnipCraft is fully functional without any external connection. It contacts a remote service only if you explicitly opt in to the optional **cloud library**.

When you open and enable the cloud library, the plugin connects to the SnipCraft cloud service at `cloud.snipcraftpro.com` to:

* fetch the catalogue of ready-made, public snippets, and
* download any snippet you choose to import into your site.

This happens only after you enable the library from within the plugin. Until then — and if you never enable it — SnipCraft sends nothing to any external server, and the plugin is fully usable offline. Browsing the public library does not transmit your personal data or your site content; importing a snippet downloads that snippet's code to your site.

The service is operated by WP Dreams. Its use is governed by the SnipCraft Terms of Use (https://snipcraftpro.com/terms-of-use/) and Privacy Policy (https://snipcraftpro.com/privacy-policy/).

== Source Code ==

The admin interface is built from JavaScript; the bundles are in `assets/build/`.
The PHP source is in `src/`.

== Changelog ==

= 1.0.0 =
* Initial public release.
* Manage PHP, CSS, JavaScript and HTML snippets, plus multi-part modules.
* Built-in CodeMirror 6 editor with syntax highlighting, WordPress-aware autocomplete and inline linting.
* Snippet revisions with view, diff and one-click restore.
* Conditional loading by URL, login state or user role, with head/footer placement and custom PHP hooks.
* Run-once snippets and a Safe Mode for recovery from a broken snippet.
* Organize snippets into folders; import and export them as JSON.
* No-code generators for redirects, custom post types, header/footer scripts and more.
* PHP security scanner that warns about risky code before you enable a snippet.
* Run debugger in the admin bar showing which snippets ran on a page.
* Test-content generator and site-reset tools for staging environments.
* Optional, opt-in cloud library of ready-made snippets.
