=== Hardcore AI SEO Content Generator ===
Contributors:      hardcorectl
Author:            株式会社ハードコア
Author URI:        https://hardcore.ne.jp/
Tags:              seo, ai, content-generator, images, openai
Requires at least: 6.0
Tested up to:      7.0
Stable tag:        1.3.0
Requires PHP:      7.4
License:           GPLv2 or later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html

Upload photos and automatically generate SEO-optimized content using AI. Supports both Claude (Anthropic) and GPT-4o (OpenAI).

== Description ==

**Hardcore AI SEO Content Generator** lets you upload multiple photos directly from the WordPress post editor and instantly generate fully SEO-optimized content powered by AI.

= What gets generated automatically =

* **Post title** — keyword-rich, under 60 characters
* **Post body** — structured HTML with h2/h3 headings, 2,000+ characters, image embedded at the right position
* **Meta description** — 120–160 characters, click-optimized
* **Image alt texts** — descriptive, SEO-friendly, saved automatically to each attachment
* **Focus keyword** — for use with Yoast SEO / RankMath / AIOSEO
* **Tags** — up to 5 relevant tags

= Key features =

* Analyze **one image** and generate a full SEO article in one step
* Works with **Gutenberg** (block editor) and **Classic Editor**
* One-click apply to the editor — no copy & paste needed
* Integrates with **Yoast SEO**, **RankMath**, and **All in One SEO**
* Option to **auto-set the first image as the featured image**
* Selected images are **saved and restored** after page reload
* Supports **Claude (Anthropic)** and **GPT-4o (OpenAI)**
* Content generated in **Japanese or English**

= Who is this for? =

* Real estate and housing companies — turn property photos into listings instantly
* Restaurant and shop owners — generate articles from food/product photos
* Web designers and agencies — speed up content creation for clients
* Bloggers and affiliate marketers — produce SEO articles from photos in minutes

= How to use =

1. Open any post or page in the WordPress editor
2. Find the **SEO Image Content Generator** meta box
3. Enter an optional target keyword
4. Select one or more images from your Media Library
5. Click **"Generate SEO Content"**
6. Apply the generated title, body, meta description, and tags with one click each

= Requirements =

* An API key from [Anthropic (Claude)](https://console.anthropic.com/settings/keys) or [OpenAI](https://platform.openai.com/api-keys)
* WordPress 6.0 or later
* PHP 7.4 or later

== External Services ==

This plugin connects to third-party AI APIs to analyze images and generate content.
**Your images and text are sent to the selected AI provider's servers.**

= Anthropic (Claude) =
* Service: [https://www.anthropic.com/](https://www.anthropic.com/)
* API endpoint used: `https://api.anthropic.com/v1/messages`
* Terms of Service: [https://www.anthropic.com/legal/consumer-terms](https://www.anthropic.com/legal/consumer-terms)
* Privacy Policy: [https://www.anthropic.com/legal/privacy](https://www.anthropic.com/legal/privacy)

= OpenAI (GPT-4o) =
* Service: [https://openai.com/](https://openai.com/)
* API endpoint used: `https://api.openai.com/v1/chat/completions`
* Terms of Service: [https://openai.com/policies/terms-of-use](https://openai.com/policies/terms-of-use)
* Privacy Policy: [https://openai.com/policies/privacy-policy](https://openai.com/policies/privacy-policy)

API calls are only made when the user explicitly clicks the **"Generate SEO Content"** button. No data is sent automatically or in the background.

== Installation ==

1. Upload the `hardcore-ai-seo-content-generator` folder to `/wp-content/plugins/`
2. Activate the plugin through the **Plugins** menu in WordPress
3. Go to **Settings → SEO Image Generator** and enter your API key
4. Open any post or page — the generator meta box will appear below the editor

== Frequently Asked Questions ==

= Which AI providers are supported? =
Claude (Anthropic) and GPT-4o (OpenAI). You can switch between them in the plugin settings.

= Do I need to provide my own API key? =
Yes. You need to obtain an API key from Anthropic or OpenAI and enter it in the plugin settings. Your key is stored securely in your WordPress database and is never shared.

= How many images can I use per generation? =
This version supports one image per generation. Select an image from your Media Library and the AI will generate a full SEO article based on it.

= Which image formats are supported? =
JPEG, PNG, WebP, and GIF.

= Does it work with the Classic Editor? =
Yes. The plugin supports both Gutenberg (block editor) and Classic Editor.

= Does it work with Yoast SEO / RankMath / AIOSEO? =
Yes. The generated meta description and focus keyword can be applied directly to Yoast SEO, RankMath, and All in One SEO fields with one click.

= Will my selected images be remembered after saving? =
Yes. Selected image IDs are saved as post metadata and restored the next time you open the editor.

= Is my data safe? =
Images and text are sent to the AI provider you selected (Anthropic or OpenAI) only when you click the generate button. Please review their privacy policies linked above.

= What languages does it support? =
Japanese and English. You can set the output language in the plugin settings.

== Screenshots ==

1. The SEO Image Content Generator meta box in the post editor
2. Multiple images selected and ready for generation
3. Generated content with title, meta description, body, and tags
4. One-click apply to the Gutenberg editor
5. Plugin settings page

== Changelog ==

= 1.3.0 =
* Changed to single-image mode: select one image per generation for a focused SEO article

= 1.2.0 =
* Removed third-party monetization SDK (Freemius) for a cleaner codebase
* Fixed: nonce verification now uses wp_unslash and sanitize_text_field as required
* Fixed: replaced HEREDOC syntax with standard string concatenation for better scanner compatibility
* Plugin slug updated to hardcore-ai-seo-content-generator

= 1.1.0 =
* Increased AI response quality with higher token limits (8000 tokens)
* Improved prompt for longer, more detailed content (2000+ characters)
* Extended API timeout to 180 seconds for reliability

= 1.0.0 =
* Initial release
* Support for Claude (Anthropic) and GPT-4o (OpenAI)
* Gutenberg and Classic Editor support
* Yoast SEO, RankMath, and AIOSEO integration
* Auto-set featured image option
* Image selection persisted across page reloads

== Upgrade Notice ==

= 1.2.0 =
All features are now fully available with no restrictions. Removed third-party SDK.
