=== AddonLogic Code Snippet Manager ===
Contributors: snehalpancholi
Tags: code snippets, php snippets, css snippets, javascript snippets, snippet manager
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.1
Stable tag: 1.0.0
License: GPL-2.0+
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Store, toggle, and safely execute PHP, CSS, and JavaScript snippets from the WordPress admin with automatic error guarding and a safe-mode rescue option.

== Description ==

Code Snippet Manager gives you a central place to store and manage custom code snippets — without editing theme files or a child theme's functions.php.

**Snippet types:**

* **PHP** — executed at `plugins_loaded` with automatic error catching. On error the snippet is auto-disabled and the error is recorded.
* **CSS** — injected into `<head>` via `wp_head`.
* **JavaScript** — injected before `</body>` via `wp_footer`.

**Features:**

* Toggle snippets on/off with a single click
* Scope control: Frontend only, Admin only, or Everywhere
* Priority ordering (lower number runs first)
* Auto-disable on PHP error with stored error message
* Safe-mode rescue: define `ADDLC_CSM_SAFE_MODE = true` in wp-config.php to skip all snippets
* Search snippets by title or description
* No external dependencies

== Installation ==

1. Upload the `code-snippet-manager` folder to `/wp-content/plugins/`
2. Activate the plugin through the 'Plugins' menu
3. Go to **Code Snippets** in the admin menu

== Frequently Asked Questions ==

= A PHP snippet broke my site — how do I recover? =
Add `define( 'ADDLC_CSM_SAFE_MODE', true );` to your `wp-config.php`. This disables all snippet execution. Then log in and fix or delete the offending snippet.

= Do I need to include `<?php` in my PHP snippets? =
No. The plugin wraps your code automatically.

= Can I use CSS and JavaScript snippets in the admin area? =
Yes. Set the scope to "Admin only" or "Everywhere".

== Changelog ==

= 1.0.0 =
* Initial release
