=== AI Theme Editor === Contributors: aithemeeditor Tags: ai, theme editor, customizer, design, chatbot Requires at least: 6.0 Tested up to: 6.7 Stable tag: 1.0.0 Requires PHP: 7.4 License: GPL-2.0-or-later License URI: https://www.gnu.org/licenses/gpl-2.0.html Edit your WordPress theme with AI. Change colors, fonts, text, layout and more — just describe what you want in plain language. == Description == **AI Theme Editor** puts a chat widget right on your site's front end. Just type what you want to change, and the AI makes it happen — no code, no Customizer diving, no theme file editing. = Features = * **Natural language editing** — "Make the background dark navy and text light grey" just works. * **20 free demo edits** — try before you buy, no API key required. * **Bring your own key** — connect Anthropic (Claude), OpenAI (GPT), or Google (Gemini) directly. * **Full undo/redo** — every change is snapshotted. Go back in time at any point. * **Granular permissions** — control exactly what the AI is allowed to change: colors, fonts, spacing, buttons, menus, custom CSS, block content, and more. * **Who can use it** — restrict the widget to Administrators, Editors, or all logged-in users. * **Works with block themes** — reads and writes Global Styles (theme.json) natively. * **Custom CSS support** — AI can append or rewrite your site's custom CSS. * **Menu editing** — rename menu items, change URLs, reorder links. * **Theme mod support** — change classic theme settings the AI-native way. = How It Works = 1. Install and activate the plugin. 2. Use the 20 free demo edits, or go to **Appearance → AI Theme Editor** to add your API key. 3. A floating chat widget appears in the bottom-right corner of your site (visible only to authorized users). 4. Type a change request. The AI reads your current theme state and proposes changes. 5. Review the proposed changes and click **Apply**. Done. 6. Made a mistake? Hit **Undo** — or browse the full snapshot history in Settings. = Supported AI Providers = * **Anthropic** — Claude Haiku 4 (default), Claude Sonnet 4, Claude Opus 4 * **OpenAI** — GPT-4o Mini, GPT-4o, GPT-4 Turbo * **Google** — Gemini 1.5 Flash, Gemini 1.5 Pro = Privacy = When using your own API key, your theme context (colors, fonts, block previews) is sent directly to your chosen AI provider. No data passes through our servers. In demo mode, requests may route through a proxy; see the FAQ for details. == Installation == 1. Upload the `ai-theme-editor` folder to `/wp-content/plugins/`, or install directly from the WordPress plugin directory. 2. Activate the plugin through the **Plugins** menu in WordPress. 3. Go to **Appearance → AI Theme Editor** to configure settings. 4. Visit your site's front end — the chat widget appears in the bottom-right corner. = Minimum Requirements = * WordPress 6.0 or higher * PHP 7.4 or higher * A block-based theme is recommended for full Global Styles support == Frequently Asked Questions == = Do I need an API key? = No — you get 20 free demo edits out of the box. After that, you'll need to add your own API key from Anthropic, OpenAI, or Google. API costs are typically a few cents per request. = Is my site content sent to the AI? = A compact snapshot of your theme's current state (colors, fonts, spacing, block previews) is sent to the AI with each request. Full post content is never sent; only the first 50 characters of each block are included as a reference. When using your own API key, data goes directly to your provider (Anthropic, OpenAI, or Google). = Will AI changes break my site? = Every change is snapshotted before it's applied. You can undo any change, or restore your site to its exact state from plugin activation using the **Reset to Original** button in Settings. = Can I control what the AI is allowed to change? = Yes. The **AI Permissions** section in Settings lets you enable or disable each category: colors, fonts, spacing, buttons, menus, block content, custom CSS, and more. = Does it work with classic themes? = Partially. Theme mod changes (`mod` type) and custom CSS work with classic themes. Global Styles changes require a block theme with theme.json support (WordPress 5.9+). Block content changes require Gutenberg block content. == Screenshots == 1. **Chat widget** — the floating AI chat widget on the site front end, ready for your first request. 2. **AI response** — the AI proposes changes with a human-readable summary and a list of specific modifications. 3. **Apply changes** — one click applies all proposed changes; the page updates instantly. 4. **Settings page** — configure your API key, provider, permissions, and snapshot limit. 5. **Snapshot history** — browse all saved snapshots and restore any previous state. == Changelog == = 1.0.0 = * Initial release. * Natural language theme editing via Anthropic, OpenAI, and Google AI. * 20 free demo edits included. * Full undo/redo with snapshot history. * Granular permissions for colors, fonts, spacing, buttons, menus, CSS, and blocks. * Settings page under Appearance → AI Theme Editor. * REST API for widget communication. * Multisite compatible uninstall cleanup.