=== Zywrap AI – The Ultimate AI Powerhouse (OpenAI, Anthropic, Gemini & Groq) ===
Contributors: zywrap
Tags: ai, openai, anthropic, groq, automation, wordpress ai, content generation, ai api
Requires at least: 5.8
Tested up to: 7.1
Stable tag: 1.3.0
Requires PHP: 7.4
License: GPL-2.0+
License URI: http://www.gnu.org/licenses/gpl-2.0.txt

Run one-click AI content tasks on any post, and call OpenAI, Anthropic, Gemini and Groq through production-ready wrappers. No prompt engineering.

== Description ==

Welcome to the future of AI in WordPress. 

Zywrap AI connects your site directly to the world’s most powerful Large Language Models (OpenAI, Anthropic, Google Gemini, and Groq) using **production-grade AI Wrappers**. 

Instead of wasting time writing, tweaking, and maintaining fragile text prompts, Zywrap provides dynamic, structured schemas for hundreds of real-world use cases. Whether you are generating SEO-optimized articles, translating complex technical documents, writing marketing copy, or formatting data, Zywrap delivers consistent, high-quality results every single time.

**Call AI by Code. Zero Prompt Engineering.**
Simply select an AI Solution, fill in the specific variables (like "Product Name" or "Target Audience"), choose your preferred AI Model, and hit generate. Zywrap handles the complex prompt engineering behind the scenes.

**Content Tasks: One Click, On The Post You Are Editing.**
New in 1.2.0. Open the Zywrap sidebar while writing and pick from 68 ready-made tasks — rewrite a paragraph, tighten the intro, draft an outline, write the excerpt, summarise the post, produce a headline. Zywrap reads the post you are on, runs the task, and shows you the result before anything is written. You review it, apply it, and undo it if you change your mind.

Content Tasks work on **every paid plan**, including Basic and Pro. There is nothing to sync and no SDK to download — the task calls the Zywrap API directly.

**Why Choose Zywrap AI?**
* **Access Every Major Model:** Seamlessly switch between GPT-4o, Claude 3.5 Sonnet, Gemini 1.5, and Llama 3 (Groq) without needing multiple API subscriptions.
* **Dynamic Schemas:** Input fields adapt automatically based on the AI wrapper you select.
* **Advanced Overrides:** Instantly change the Tone, Style, Formatting, and Complexity of any output with a single click.
* **No More AI Hallucinations:** Because our wrappers are strictly engineered on the backend, you get predictable, formatted outputs that are ready for publishing.

= Video Tutorial =

Watch the full setup and usage walkthrough to see Zywrap in action

https://www.youtube.com/watch?v=unGU_9gvXpo


== Features ==

* **Multi-Model Support:** Use models from OpenAI, Anthropic, Groq, and Google directly in your editor.
* **Zero Prompting Required:** Use structured inputs (Dynamic Schemas) instead of messy text prompts.
* **Gutenberg & Classic Editor:** Native integration seamlessly inserts content exactly where your cursor is.
* **Advanced Playground:** Test AI models, wrappers, and parameters in a dedicated admin workspace.
* **Preset System:** Save your favorite configurations (Model + Wrapper + Tone) for 1-click loading later.
* **Granular Usage Tracking:** Monitor exactly which models are being used, token consumption, and API latency.
* **Custom Post Type Support:** Enable Zywrap on Posts, Pages, WooCommerce Products, or any custom post type.
* **68 Content Tasks:** Rewriting, summarising, outlines, blog and marketing copy — run against the post you are editing, no setup required.
* **Review Before You Apply:** Every task shows its output first. Apply it to the field, or undo it afterwards.
* **Works On Any Paid Plan:** Content Tasks need no wrapper sync and no offline SDK, so Basic and Pro get full use of the plugin.

== Installation ==

1. Upload the `zywrap` folder to `/wp-content/plugins/` (or search for it in the Plugin directory).
2. Activate the plugin through the Plugins menu in WordPress.
3. Open Zywrap > Get Started and click "Connect to Zywrap". Create a free account (email, Google or GitHub) or sign in, approve your site, and you are sent straight back, connected. New accounts start with **10,000 free credits**.
4. Try a task on one of your own posts right there, or open any post and click the Zywrap icon in the editor toolbar.

Already have an API key? Choose "I already have an API key" under Zywrap > Settings and paste it in.

Optional: to use the Playground and the full wrapper catalogue, click "Download & Sync Data" in Settings to pull the AI Wrappers into your local database. Content Tasks do not need this step.

== Frequently Asked Questions ==

= Do I need a Zywrap account? =
Yes. Zywrap AI is a powerful bridge to the Zywrap API platform. Creating a free account gives you instant access to all supported AI models through a single, unified API key.

= Where does Zywrap appear in the editor? =
* **Content Tasks (Block Editor):** Click the Zywrap icon in the editor toolbar to open the sidebar. Tasks also appear in a "Zywrap" panel in the document settings, and in a check on the pre-publish screen.
* **Full Wrapper Modal (Block Editor):** Open the (⋮) Options menu in the top-right corner and select "Zywrap AI".
* **Classic Editor:** The Zywrap AI button appears directly above your formatting toolbar, next to the "Add Media" button.

= Do Content Tasks need an Enterprise plan? =
No. Content Tasks run on any paid plan, including Basic and Pro. They call the Zywrap API directly, so there is no wrapper sync and no offline SDK involved. The offline SDK and the full wrapper catalogue remain Enterprise features.

= Do I have to sync before I can use the plugin? =
No. Content Tasks work as soon as your API key is verified. The sync is only needed for the Playground and the local wrapper catalogue.

= Zywrap cannot connect from my local or staging site =
Local environments often use a self-signed certificate that PHP refuses. Add this to a small mu-plugin on that environment only:

`add_filter( 'zywrap_sslverify', '__return_false' );`

Never use this on a production site — it disables certificate verification for calls to the Zywrap API.

= Do I need to write prompts? =
No! That is the magic of Zywrap. Our AI Wrappers already contain highly optimized system instructions. You only need to provide simple, task-specific variables (like a topic or a keyword).

= Is the generated content editable? =
Absolutely. All generated content is inserted directly into the WordPress editor where you can format, edit, and publish it just like normal text.

= Where do I report security bugs? =
Please report security bugs found in the source code through the [Patchstack Vulnerability Disclosure Program](https://patchstack.com/database/vdp/6a2931de-5c15-4cc2-ad6a-74b074bd33c9). The Patchstack team will assist you with verification, CVE assignment, and notify our developers.

== External Services ==

This plugin relies on Zywrap, a third-party service run by WiselyHub LLC, to generate AI content. Nothing is sent to Zywrap when the plugin is activated, and nothing is ever sent about your site's visitors. Every request below starts with an action by a logged-in user in wp-admin.

= Zywrap website (zywrap.com): connecting your site =

Used once, when an administrator clicks "Connect to Zywrap". The browser goes to https://zywrap.com/connect/wordpress, where the administrator creates a Zywrap account or signs in and approves the site.

* Sent in that link: your site's address and name, the wp-admin address to return to, two one-time security values (a random state and a PKCE challenge, which contain no personal data), and campaign tags showing the visit came from this plugin.
* Anything typed on zywrap.com, such as an email address to create an account, is given to Zywrap directly under Zywrap's own terms.

= Zywrap API (api.zywrap.com) =

* **Finishing the connection.** After approval, your site sends Zywrap the one-time code it received, the matching security value it kept, and your site's address. Zywrap returns an API key for this site, the email address of the connected Zywrap account and its credit balance. These are stored in your WordPress database (options `zywrap_api_key` and `zywrap_account`).
* **Checking a key entered by hand.** When you click "Verify and save", the key is sent to Zywrap to confirm it is valid.
* **Running a task or the Zywrap AI modal.** When a user clicks to run a task, your site sends the API key, the task's identifier, the chosen AI model and options such as tone or length, and the content the task works on, listed below. Zywrap passes this content to the AI provider of the chosen model (for example OpenAI, Anthropic, Google or Groq) to produce the result, and keeps a usage record for billing.
    * Post tasks: the post's text (trimmed to a word limit), title, post type, and category and tag names.
    * Image tasks: the image's file name, title and caption, and the title of the post it is attached to.
    * Playground and modal: whatever you type into the form.
* **Downloading the catalogue (optional).** Only when you click "Download & Sync Data": the API key and the version of the catalogue already on your site.

Zywrap Terms of Service: https://zywrap.com/terms
Zywrap Privacy Policy: https://zywrap.com/privacy

= YouTube (video on the Zywrap Dashboard) =

The Zywrap Dashboard page in wp-admin embeds the setup tutorial video from YouTube. When an administrator opens that page, the browser loads the YouTube player, and YouTube (Google) receives the viewer's IP address and browser information. Nothing is sent to YouTube on any other page.

YouTube Terms of Service: https://www.youtube.com/t/terms
Google Privacy Policy: https://policies.google.com/privacy

== Screenshots ==

1. The Zywrap Onboarding Dashboard with Video Tutorial
2. Advanced AI Playground with Dynamic Schemas
3. Zywrap AI modal running directly inside the Gutenberg Editor
4. System Logs tracking API latency and trace IDs
5. Detailed Usage Statistics showing model usage and token counts
6. Settings page for 1-click Wrapper Synchronization

== Changelog ==

= 1.3.0 =
* NEW: One-click connect. Click "Connect to Zywrap", sign up or sign in on zywrap.com, approve the site, and come back connected. No key to copy.
* NEW: Get Started screen. Right after connecting, try three tasks on your own latest post.
* IMPROVED: The catalogue download is optional and labelled so; Content Tasks never needed it.
* SECURITY: The settings page no longer prints the saved API key into the page source.
* PRIVACY: Chart.js on the Dashboard now loads from the plugin instead of a CDN. External Services lists every outside request, including the connect step and the YouTube video on the Dashboard.

= 1.2.0 =
* NEW: Content Tasks — 68 one-click tasks (rewriting, summarising, outlines, blog and marketing copy) that run against the post you are editing.
* NEW: Zywrap sidebar in the block editor, with search across the task library, plus a document settings panel and a pre-publish check.
* NEW: "Content Tasks" admin screen listing the full library, grouped and filterable.
* NEW: Generate, review, apply, undo — nothing is written to a field until you approve it, and every applied task can be reverted.
* SECURITY: Task endpoints check the capability for the specific post being edited, and are rate limited.

= 1.1.0 =
* MAJOR: Upgraded to Zywrap V1 API Architecture.
* NEW: Multi-Model Support (Switch between OpenAI, Anthropic, Groq, Google).
* NEW: Introduced Dynamic Schemas (Input fields adapt automatically to your selected wrapper).
* NEW: Advanced Overrides (Control Tone, Style, Length, and Complexity on the fly).
* NEW: Interactive Onboarding Dashboard with 10k Free Credit incentive.
* UI: Completely redesigned the Playground and Editor Modal for a premium SaaS layout.
* PERF: Added in-memory JavaScript caching for lightning-fast schema rendering.

= 1.0.2 =
* FIX: Updated API handler to support Streaming/SSE responses.
* NEW: Implemented "Smart Sync" (Delta Updates) to drastically reduce sync time and bandwidth.

= 1.0.1 =
* Fixed bug where Language parameter was ignored
* Fixed issue with default model fallback

= 1.0.0 =
* Initial public release
* Transaction-safe wrapper syncing
* Presets and Playground
* Admin dashboard with caching
* Smart API error handling

== Upgrade Notice ==

= 1.3.0 =
Adds one-click connect and a Get Started screen. Existing API keys and settings keep working; there is nothing to re-sync.

= 1.2.0 =
Adds Content Tasks: 68 one-click AI tasks that run on the post you are editing, available on every paid plan. No re-sync is needed — your existing wrappers and settings are untouched.

= 1.1.0 =
Massive V1 Upgrade! This update brings Multi-Model support (Anthropic, Groq, OpenAI), Dynamic Input Schemas, and Advanced Parameters directly into WordPress. After upgrading, please visit the Zywrap Settings page to perform a one-time Data Sync.
