=== Alt Text & Image SEO — ALTification ===
Contributors: afinestudio
Tags: alt text, accessibility, seo, ai, images
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

AI-powered alt text generator that finds and fixes image SEO gaps in WordPress.

== Description ==

ALTification uses AI to generate keyword-aware alt text, captions, and descriptions for your images — directly from your SEO plugin's focus keyphrase and page context.

**Features:**

* Bulk generate alt text across your entire site with the Site Scan
* Page-level generation with keyword context from Yoast SEO, Rank Math, AIOSEO, SEOPress, and The SEO Framework
* Generate captions and descriptions alongside alt text
* Media Library column showing SEO health badges for every image
* Post editor metabox for inline generation
* Detect and fix SEO gaps where alt text doesn't reflect the page keyword
* Mark decorative images to suppress alt text (WCAG compliant)
* Supports WooCommerce products, ACF image fields and shared images
* Before & After report for agency workflows

ALTification connects to the ALTification platform API to generate content. An API key is required.

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/`.
2. Activate the plugin through the Plugins screen in WordPress.
3. Go to **ALTification → Settings** and enter your API key from [altification.ai](https://altification.ai).
4. Run the **Site Scan** to assess your images, then generate alt text in bulk or page by page.

== Frequently Asked Questions ==

= Do I need an API key? =

Yes. You only need an ALTification API key — get yours from [altification.ai/dashboard](https://altification.ai/dashboard). You do not need to manage your own Anthropic or other AI provider key; generation is handled on the ALTification server. See the External Services section below for details on how data is processed.

= Which SEO plugins are supported for keyword context? =

Yoast SEO, Rank Math, All in One SEO, SEOPress, and The SEO Framework are all supported. The focus keyphrase is read automatically when you load a page in the scanner.

= Can I generate alt text for WooCommerce products? =

Yes. Product images use the product's focus keyword and the WooCommerce product context is included in the prompt.

= Does it support ACF image fields? =

Yes. ALTification scans for ACF image fields and prompts you to add any newly discovered fields to your settings.

= Is the generated alt text saved automatically? =

Optionally. You can enable "Save on generation" in the Site Scan to save automatically, or review and save manually.

= Which post types are scanned? =

Pages and posts always, plus every public custom post type on your site — including any registered after you last saved your settings. You can exclude individual types under **ALTification → Settings → Custom post types**. Leaving a type unscanned means images used only in that type are never matched to a page, so they fall back to generic alt text instead of the page's keyword.

= Why does an image say it was uploaded from a page it isn't on? =

WordPress records which post's editor was open when a file was uploaded and shows it as "Uploaded to" in the Media Library. It is not a record of where the image is used — uploading several files in one go leaves them all pointing at a single page. ALTification only takes a keyword from a page the image was actually found on, so where the two disagree it tells you and uses your site-wide default keyword instead.

== Screenshots ==

1. Site Scan — bulk generate alt text across your entire site, with SEO gap detection and WooCommerce product context
2. Site Scan — shared image handling, with product priority and site-wide keyword fallback
3. Page Scan — select a page, post, or custom post type and load images with SEO keyword context
4. Page Scan — generate contextual alt text per image, with filename intelligence and smart shared image handling
5. Preview & Refine — test tone, length, and keyword balance for free before spending any credits
6. About Your Business — automatically reads your site so the AI understands your business context from day one

== External Services ==

This plugin sends data to the ALTification API and Anthropic (Claude) when you trigger a generation, scan, or credit check — never automatically in the background.

= ALTification API =

Endpoint: https://altification.ai/wp-json/altification/v1/

When you generate, the plugin sends:

* Your image (as a URL or base64-encoded data)
* The page's SEO context (focus keyword, meta title, meta description, where available from your SEO plugin)
* Your site's context (site name, language, WooCommerce product/category data if relevant, a short excerpt of your homepage text, ACF field content if you have configured ACF support)
* A non-identifying site fingerprint (an MD5 hash of WordPress's COOKIEHASH and site URL, used to lock your API key to one site)
* Your ALTification API key

The API returns the generated text, your remaining credit balance and your account status.

ALTification does not store the image after the response is returned.

* ALTification Privacy Policy: https://altification.ai/privacy-policy/
* ALTification Terms of Service: https://altification.ai/terms/

= Anthropic (Claude) =

ALTification's server uses Anthropic's Claude API to produce generated text. The plugin does not call Anthropic directly — no Anthropic account or key is needed.

* Anthropic Privacy Policy: https://www.anthropic.com/legal/privacy
* Anthropic Commercial Terms: https://www.anthropic.com/legal/commercial-terms

Use of this plugin requires an ALTification account and API key, available at https://altification.ai.

== Changelog ==

= 1.0.4 =
* Fixed: images could be generated using the keyword of the page they were uploaded from rather than the page they appear on. WordPress records which post's editor was open at upload time, so a batch upload left every file pointing at one arbitrary page
* Fixed: alt text generated on upload was marked as reviewed immediately, so an incorrect keyword was never re-checked by a later scan. It is now provisional until a scan confirms which page the image is on
* Fixed: accurate alt text could be flagged as an SEO gap, and "Fix SEO gap" would then overwrite it using an unrelated page's keyword
* Fixed: custom post types registered after your settings were last saved were silently left out of scans. All public post types are now scanned unless you exclude them in Settings
* Fixed: WooCommerce product context could be applied to an image that belongs to a different product
* New: the Site Scan and Media Library now show when an image was uploaded from a page it does not appear on, rather than presenting that page as its source
* Affected images are re-flagged for review on your next Site Scan. Images you marked as reviewed yourself are left untouched

= 1.0.3 =
* Account dashboard now shows the site language badge for American English (US) sites, not just non-default locales
* Each generation sends an explicit language display label to the account platform
* No change to language detection or generated output

= 1.0.2 =
* Fixed a bug where the editor metabox could interfere with ACF's own field resolution on the post edit screen, occasionally causing ACF field values to display incorrectly until a hard refresh
* Editor metabox content now loads asynchronously for better compatibility with sites using Advanced Custom Fields
* Reduced the metabox's performance impact on sites with a large number of pages

= 1.0.1 =
* Fixed bulk generation completion notification
* Fixed error filter label and scroll-to-error behaviour
* Error rows now persist across page navigation
* Updated plugin introduction
* Updated plugin name for better discoverability

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.4 =
Important accuracy fix. Images could be given the keyword of the page they were uploaded from rather than the page they appear on, which mainly affects batch uploads. Your next Site Scan re-flags affected images for review.

= 1.0.3 =
Cosmetic dashboard fix — the site language badge now appears for US English sites. No change to generation.

= 1.0.2 =
Fixes a bug affecting ACF field display on sites using Advanced Custom Fields — recommended for anyone running ACF alongside ALTification.

= 1.0.1 =
Bug fixes and improvements to the bulk generation interface.

= 1.0.0 =
Initial release.
