=== Filter AI === 
Contributors: filterdigital, paulhalfpenny, robertmeacher, guyhillary, davecpage, ianharrisfilter
Tags: ai, seo, content, alt-text, image-generation
Requires at least: 6.3 
Tested up to: 7.0
Stable tag: 1.8.1
Requires PHP: 7.4 
License: GPLv3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html

AI tools inside WordPress — generate meta, ALT text, product descriptions, images and rewrite content from the editor.

== Description ==
Filter AI brings AI-powered content tools directly into the WordPress admin so you can scale content production, improve SEO, and maintain a consistent brand voice without leaving your site.

Key capabilities include:

* **Brand voice and stop words**
  Configure a brand voice and global stop words so every AI result follows your style and avoids unwanted terms.

* **Post and page titles**
  Generate SEO-friendly, click-focused titles based on the content’s core value proposition.

* **ALT text generation**
  Automatically create descriptive ALT text on image upload and bulk-generate ALT text for existing media to improve accessibility and SEO.

* **Yoast SEO metadata**
  Generate meta titles and descriptions (single or batch), respecting character constraints and best-practice recommendations for SEO plugins such as Yoast.

* **WooCommerce product descriptions**
  Produce product descriptions that highlight benefits, address customer needs and include natural SEO keywords.

* **Image generation**
  Create images from prompts, save to the Media Library with metadata, and use them instantly in posts and products.

* **Content rewriting and tone adjustment**
  Expand, condense, summarise or rewrite content and change tone while preserving context and meaning.

* **Excerpts and tag suggestions**
  Auto-generate concise excerpts and suggest relevant tags to improve discoverability and site structure.

* **Choice of AI provider and BYO API key**
  Bring your own API key and choose from supported providers; switch providers without disrupting workflows. On WordPress 7.0 and later, Filter AI uses the built-in WordPress AI Client and you manage provider API keys in **Settings → Connectors** — no extra plugin required. On earlier WordPress versions, Filter AI uses the [AI Services plugin](https://wordpress.org/plugins/ai-services/).

* **Batch processing and workflow controls**
  Apply actions across many posts, pages or media items to save time and ensure consistent output.

Filter AI is designed to integrate with the WordPress editor and common workflows. You remain in control of every output with editable suggestions, prompt templates and global defaults.

== Installation ==
1. Upload the `filter-ai` folder to the `/wp-content/plugins/` directory, or install via the WordPress plugin installer.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. On WordPress 7.0 and later, add your AI provider API key(s) in **Settings → Connectors**. On earlier WordPress versions, add your provider key(s) in **Settings → Filter AI**.
4. Navigate to **Settings → Filter AI** to configure brand voice, stop words, prompt templates and defaults.
5. Use the new Filter AI controls on posts, pages, products and media to generate and apply content.

== Frequently Asked Questions ==
= Do I need an account with Filter AI? =
No. Filter AI acts as a connector — you provide and manage your own AI provider API key(s).

= Which AI providers are supported? =
Filter AI supports major providers — OpenAI, Anthropic, Gemini, xAI, Perplexity and Mistral — and can be extended to others.

= Will it overwrite existing content? =
No. Generated text is provided as editable suggestions; you must confirm or save changes.

= Can I bulk-generate content? =
Yes. Batch processing is available for meta data, ALT text and other supported operations.

= Is the plugin accessible-friendly? =
Yes. The ALT text generation feature is designed to improve accessibility by producing descriptive ALT attributes for images.

= Do I need the AI Services plugin? =
It depends on your WordPress version. On WordPress 7.0 and later, Filter AI uses the built-in WordPress AI Client and Settings → Connectors for API key management — the AI Services plugin is not required. On WordPress versions below 7.0, the AI Services plugin is required and Filter AI continues to use it exactly as before.

== Screenshots ==

1. Filter AI settings: brand voice, API keys and prompt templates.
2. Post editor: generate meta title and description.
3. Media library: generate ALT text for images (single and bulk).
4. WooCommerce product page: generate product description.
5. Image generator UI with prompt and generated options.

== Upgrade Notice ==

= 1.8.1 =
Fixes WordPress 7.0 OpenAI model detection for image ALT text generation.

= 1.8.0 =
Adds per-feature AI model selection for configured providers and improves provider capability handling.

= 1.7.2 =
Fixes Generate from Prompt on WordPress 6.9 by using the one-shot fallback for the legacy AI Services backend.

= 1.7.1 =
Fixes prompt-based text generation on WordPress 6.9.

= 1.7.0 =
Adds WordPress 7 native AI support, brand voice generation, inline regeneration controls, and batch SEO improvements.

== Changelog ==

= 1.8.1 =

**Bug fixes:**

* Fix WordPress 7.0 OpenAI model detection so image ALT text generation is available when the configured model supports image input.
* Keep Filter AI settings tabs readable when WordPress admin styles override nested tab selectors.

= 1.8.0 =

**Enhancements:**

* Add per-feature provider/model selection, with model-aware options such as `Anthropic (Claude) - Auto`, `Anthropic (Claude) - Claude Opus`, and `Anthropic (Claude) - Claude Haiku`.
* Keep automatic model selection available from the same AI Provider / Model dropdown by choosing a provider's Auto option.
* Refresh available provider models daily and cache the last successful model catalogue, keeping stale model options visible if a refresh fails.

**Bug fixes:**

* Prevent unsupported AI features from being enabled when no configured provider can handle the required capability, such as image generation with text-only providers.
* Move AI error logs into the Settings screen and improve admin links so failed requests are easier to review.
* Avoid queueing a brand voice scan when a brand voice prompt has already been filled.
* Improve compatibility with Anthropic responses from AI Services when tool or thinking response parts are present.

= 1.7.2 =

**Bug fixes:**

* Fix Generate from Prompt on WordPress 6.9 by using the one-shot fallback for the legacy AI Services backend, avoiding provider stream chunks that can trigger "Invalid part data."

= 1.7.1 =

**Bug fixes:**

* Fix prompt-based text generation on WordPress 6.9 by routing legacy text requests through Filter AI's REST adapter.

= 1.7.0 =

**Enhancements:**

* Added: Native WordPress 7.0 AI Client support — on WP 7.0+, Filter AI uses the built-in AI Client and Settings → Connectors for API keys, with no dependency on the AI Services plugin.
* Added: First-party REST endpoints (filter-ai/v1) powering the editor features on WP 7.0+.
* Changed: AI requests now route through an internal provider abstraction that selects the native client (WP 7.0+) or AI Services (older versions) automatically.
* Maintained: Full backwards compatibility — on WordPress below 7.0, Filter AI continues to use the AI Services plugin exactly as before.

= 1.6.0 =

**Enhancements:**

* New anonymous opt-in telemetry to help us improve Filter AI. Sends only WordPress version, PHP version, locale, and which Filter plugins are active — never post content, user data, or anything personally identifiable. Disabled by default; opt in via the prompt that appears in the WordPress admin after upgrading.

**Bug fixes:**

* Fix media uploads failing when automatic ALT text generation could not reach the configured AI service. The error is now caught silently and the upload completes normally.
* Fix the settings sanitiser silently coercing array values to empty strings; unknown setting keys are now dropped rather than passed through.
* Fix undefined-variable notice when rendering image blocks with no media ID.
* Fix typo in the prompt-retrieval error message.
* Remove a duplicate option from the uninstall cleanup.

**Security:**

* Hardening of batch generation AJAX endpoints.

= 1.5.1 =

**Bug fixes:**

* Fix generate alt text bug
* Dependency updates

= 1.5.0 =

**Enhancements:**

* New generate summary block
* New grammar checking option for content
* Updated choice for page titles and customised text
* Various dependency updates and bug fixes

= 1.4.0 =

**Enhancements:**

* New generate FAQs block
* New options to select AI service per feature
* Improvements to the generate image user journey
* Manage API keys directly within Filter AI settings
* Update to the plugin branding

**Bug fixes:**

* Fix `Function _load_textdomain_just_in_time was called incorrectly`
* Improve support with the classic editor
* Improve messaging on the batch generation pages
* Improve developer setup process

= 1.3.1 =

**Bug fixes:**

* Improve messaging across the settings and generation pages

= 1.3.0 =

**Enhancements:**

* Custom image generation
* Dynamically replace missing alt text
* Automatic plugin updates

= 1.2.2 =

**Bug fixes:**

* Standardise location of composer/package files for WooCommerce Action Scheduler

= 1.2.1 =

**Enhancements:**

* Update Github actions to automatically trigger on releases
* Update composer setup to support releasing onto Packagist.org

= 1.2.0 =

**Enhancements:**

* Add features to generate Yoast SEO title and meta descriptions including batch generation
* Add feature to generate image ALT text on upload
* Add option to add stop words to the AI prompt
* Add option to add a brand voice to the AI prompt
* Generating modal UI improvements

**Bug fixes:**

* Update settings page features to respond to status of required plugins
* Code stability improvements

= 1.1.0 =

**Enhancements:**

* Improved text generation prompts for AI requests
* Settings screen UX improvement
* Improved compatibility with AI Services plugin
* Improved general database performance when batch updating images
* Decreased timeout issues arising from batch updating images

**Bug fixes:**

* Correct link to edit an image that doesn't have its alt text updated during batching

= 1.0.0 =

* Initial public release of Filter AI

== About Filter ==

[Filter](https://filter.agency/) is a leading digital agency dedicated to creating innovative solutions that help businesses leverage technology effectively. We're deeply invested in helping businesses leverage AI effectively, developing custom solutions that solve real business challenges.

Our approach to AI focuses on practical, implementable solutions that solve real business challenges – and Filter AI embodies this philosophy perfectly. By making AI accessible within the familiar WordPress environment, we're helping content teams work more efficiently without sacrificing quality or control.

Check out our other WordPress plugin, [PersonalizeWP](https://personalizewp.com/), which allows you to display personalised content on your WordPress website using the Block Editor.
