=== Arb Code Pro — Premium Code Snippets Manager ===
Contributors: arbdigital
Tags: code snippets, php, header footer, functions.php, custom code, ai
Requires at least: 5.6
Tested up to: 6.7
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

The next-level way to add custom PHP, JS, CSS & HTML to WordPress — with AI generation, crash protection, conditional logic, scheduling and revisions. No functions.php editing.

== Description ==

Arb Code Pro is a premium snippets manager built to go beyond WPCode. Add code without touching theme files, and never break your site again thanks to Safe Mode.

**Why it's next level:**

* ✨ **AI Snippet Generator (Claude)** — describe what you want in plain English and get a safe, ready-to-activate snippet. Also explains/audits existing code.
* 🛡️ **Safe Mode crash protection** — a fatal error auto-deactivates the snippet, logs it and emails you. Your site stays online.
* ✅ **Pre-save PHP linting** — syntax is validated before a snippet can go live.
* 🎯 **Smart conditional logic** — run snippets by page type, post ID, URL, user role, login status, referrer, cookie or device, with ALL/ANY matching.
* ⏰ **Scheduling** — auto activate/deactivate snippets between start and end dates (great for sale banners).
* 📍 **Smart auto-insert** — header, body, footer, before/after content, after the Nth paragraph, WooCommerce hooks, shortcode, admin-only, or run-everywhere PHP.
* 🕓 **Revision history** — every save is snapshotted; roll back a bad edit in one click.
* 📚 **Built-in library** — vetted one-click snippets (analytics, security hardening, WooCommerce, and more).
* 📦 **Import / Export** — move snippets between sites as portable JSON.
* 📊 **Activity log** — full audit trail of who changed what.
* 🎨 **Premium CodeMirror editor** — syntax highlighting for PHP/JS/CSS/HTML, test-run, and a clean Arb-branded UI.

Supported code types: PHP, HTML, CSS, JavaScript, Universal (HTML+PHP), Gutenberg/Shortcode.

== Installation ==

1. Upload the `arb-code-pro` folder to `/wp-content/plugins/`.
2. Activate through the **Plugins** menu in WordPress.
3. Open **Arb Code Pro** in the admin sidebar.
4. (Optional) Add your Claude API key under **Settings** to enable the AI Generator.

== Frequently Asked Questions ==

= Is it safe to run PHP? =
Yes. Safe Mode catches fatal errors and auto-deactivates the offending snippet, and all PHP is syntax-checked before it can be activated. Access is limited to administrators.

= Do I need an API key? =
Only for the AI features. Everything else works without one.

= Will it slow my site? =
No. Active snippets are loaded once per request and grouped by location; conditions are evaluated lazily.

== Changelog ==

= 1.0.0 =
* Initial release: snippet engine, Safe Mode, conditional logic, scheduling, AI generator, revisions, library, import/export, activity log.
