=== Aluleth AI Writer ===
Contributors: aluleth
Tags: ai, content, writing, seo, alt text
Requires at least: 7.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Write, rewrite and polish your website content with AI in the block editor, in your brand voice. Uses the AI provider you connect in WordPress.

== Description ==

Aluleth AI Writer helps you write the content of your website, right where you edit it.

* **Rewrite any text block:** improve, shorten, lengthen, fix spelling and grammar, simplify, or make it more persuasive, professional or friendly. You can also give your own instruction ("translate into Spanish", "mention free delivery"). You see the text before and after, and you choose whether to replace it.
* **Write a page section:** hero, features or services, about us, questions and answers, call to action, steps, or free form. The section is inserted as normal blocks (headings, paragraphs, lists and buttons) that you can edit.
* **SEO title, meta description and excerpt** suggested from the page content, saved where your SEO plugin reads them (Yoast SEO, Rank Math, SEOPress, The SEO Framework) or by this plugin when no SEO plugin is active.
* **Image alt text** for accessibility, from the image block toolbar or the media library.
* **Brand voice:** describe your business, your customers, your tone and the words to use or avoid in Settings > AI Writer. Every text follows it.
* **Abilities:** the writing tasks are also registered with the WordPress Abilities API, so AI agents and other plugins can use them with the same permissions.
* **You choose who can use it:** Authors and up by default (Contributors, Editors or Administrators only in Settings > AI Writer), on the content they are allowed to edit, with at most 20 requests a minute and 400 an hour per person, so nobody can run up your AI bill.

The plugin uses the AI features built into WordPress 7.0 and later. You connect your own key (for example OpenAI, Google Gemini or Anthropic Claude) in Settings > Connectors. Your API key stays in WordPress: this plugin never stores or reads it, and it has no account, quota or subscription.

Nothing is sent automatically. Text or an image is sent to your AI provider only when you click an AI Writer action, and the result is never published without your approval.

== External services ==

This plugin sends content to the AI provider that the site owner connects in Settings > Connectors (WordPress 7.0+). The connection itself is made by WordPress; this plugin only decides what to send, and only when a user clicks one of its actions.

* **What is sent:** the text you choose to rewrite, the brief and page context for a new section, the page title and content for SEO suggestions, or the image for alt text, together with your brand voice settings.
* **When:** only when a user allowed in Settings > AI Writer clicks an AI Writer action, on content they can edit.
* **Providers:** depending on the connector you set up:
  * OpenAI – [Terms of use](https://openai.com/policies/terms-of-use/), [Privacy policy](https://openai.com/policies/privacy-policy/)
  * Google (Gemini) – [Terms](https://ai.google.dev/gemini-api/terms), [Privacy policy](https://policies.google.com/privacy)
  * Anthropic (Claude) – [Commercial terms](https://www.anthropic.com/legal/commercial-terms), [Privacy policy](https://www.anthropic.com/legal/privacy)
  * If you connect another AI provider in Settings > Connectors, the same content goes to that provider, under its own terms and privacy policy.

If a page you send shows content written by visitors (for example comments), that content is part of what is sent.

This plugin makes no other outside request: it does not send any data to its authors, does not track users, and works out the name of your site language on your server.

== Installation ==

1. Install and activate the plugin.
2. Go to Settings > Connectors and add an API key (for example OpenAI, Google or Anthropic).
3. Optional: describe your brand voice, and choose who can use AI Writer, in Settings > AI Writer.
4. Open a page in the block editor: use the sparkle menu in a block toolbar, or the AI Writer sidebar (sparkle icon at the top right).

== Frequently Asked Questions ==

= Do I need an account with you? =

No. You only need an API key from an AI provider (for example OpenAI, Google or Anthropic), added in Settings > Connectors. Google offers a free tier for its Gemini API.

= How much does it cost? =

The plugin is free. Your AI provider charges you for what you use, according to its own prices.

= Which WordPress version do I need? =

WordPress 7.0 or later, which includes the AI Client and the Connectors screen.

= Does it work with Elementor? =

Elementor support is planned. This version works in the block editor and the media library.

= Who can use it? =

Authors, Editors and Administrators by default, each only on the content they can edit. Change it in Settings > AI Writer (from Contributors to Administrators only), or with the `aluleth_aiw_capability` filter. Each person can send at most 20 AI requests a minute and 400 an hour (filter `aluleth_aiw_rate_limits`).

= What is deleted with the plugin? =

Its settings and brand voice. The SEO titles and descriptions it saved (and the Undo copies kept by Aluleth AI Writer Pro) are deleted too when you tick "Also delete…" in Settings > AI Writer. The texts you put into your pages stay.

= Will it publish anything on its own? =

No. Every suggestion is shown to you first, and nothing changes until you click Replace, Insert or Use these texts.

== Changelog ==

= 1.0.1 =
* Who can use AI Writer: a setting (Authors and up by default), and a limit of AI requests per person and minute or hour, counted in one database statement so requests sent at once are all counted.
* The AI writes in the site language (it used the language of the editor's profile), worked out on the server without calling WordPress.org.
* The "Before" text of the rewrite window is shown as plain text.
* The SEO title saved by the plugin is escaped when printed.
* Abilities are marked as not read-only (each call is a paid request).
* Works without the mbstring PHP extension. Translations load from the plugin's languages folder.
* Uninstall: settings and brand voice are removed; SEO texts only when you ask for it.
* Complete copies: the plugin can be carried inside Aluleth AI Writer Pro; only one copy runs.

= 1.0.0 =
* First release: rewrite text blocks, write page sections, SEO title and description, image alt text, brand voice, abilities.

== Upgrade Notice ==

= 1.0.1 =
Choose who can use AI Writer (Authors and up by default), with a limit of requests per person.

= 1.0.0 =
First release.
