=== Talemai H1 Optimizer ===
Contributors: amatum, rabbit71
Tags: seo, h1, openrouter, permalink, 301
Requires at least: 6.7
Tested up to: 7.0
Stable tag: 1.3.0
Requires PHP: 8.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Generate SEO-optimized H1 headlines with AI. Includes automatic permalink optimization and 301 redirects.

== Description ==

The **Talemai H1 Optimizer** is a lightweight WordPress plugin that generates SEO-optimized H1 headlines from your page or post content. With the help of AI (OpenRouter), you receive three tailored suggestions – applied with one click.

= Key Features =

* 🤖 **AI-Powered H1 Generation** – Analyzes your content and delivers 3 SEO-optimized H1 suggestions
* ⚡ **One-Click Application** – Select a headline, and it's immediately applied to your post/page
* 🔗 **Automatic Permalink Optimization** – Optionally updates the URL to match your new H1
* 🔄 **301 Redirects** – Creates an automatic redirect from the old URL to the new one
* 📦 **Backup Function** – Stores the original H1 for later restoration

== External Services ==

This plugin uses the OpenRouter API (https://openrouter.ai) to generate AI-powered H1 headline suggestions.

**What data is sent:** The content of your post/page (up to 400 words) is sent to the OpenRouter API when you click the "Generate" button. No personal data is transmitted.

**Service provider:** OpenRouter - [Terms](https://openrouter.ai/terms) | [Privacy](https://openrouter.ai/privacy)

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/`, or install via WordPress plugin screen.
2. Activate the plugin through the 'Plugins' screen.
3. Go to **Settings → H1 Optimizer** to configure (a free API key is pre-configured).
4. Edit a post or page – you will find the "H1 Optimization" button.

== Frequently Asked Questions ==

= Do I need my own API key? =

No. A free API key is pre-configured.

= Does this work with Elementor? =

Yes.

= What happens to my old URLs? =

When enabled, the plugin creates a 301 redirect from the old URL to the new one.

== Changelog ==

= 1.3.0 =
* **PERFORMANCE:** Einstellbares Limit für max. zu prüfende Sätze pro Beitrag
* Neue Einstellung: "Max. zu prüfende Sätze" (Standard: 500)
* Transparente Info im Popup: Zeigt an, wie viele Sätze geprüft wurden
* Frühzeitiger Abbruch bei drohendem Timeout
* Optimiert für große Datenbanken (6000+ Seiten)

= 1.2.0 =
* **MAJOR NEW FEATURE:** Duplicate Content Checker
* Satzweise Analyse des Beitragsinhalts auf exakte Duplikate in der Datenbank
* KI-gestützte Umschreibung doppelter Sätze (gleicher Sinn, andere Satzstellung)
* Popup mit Vorher/Nachher-Ansicht und editierbaren Vorschlägen
* Fortschrittsanzeige während der KI-Generierung
* "Alle auswählen"-Funktion für Bulk-Änderungen
* Neuer Button im Editor: "Duplicate Content Check"

= 1.1.0 =
* Fixed UTF-8 encoding issues for umlauts in AJAX responses
* Simplified AJAX handler using native WordPress functions (wp_send_json_success)
* Removed redundant manual header and encoding calls
* Improved compatibility with various hosting environments (IONOS, etc.)

= 1.0.9 =
* **Security:** Removed all .bmp screenshot files from assets folder
* **Compliance:** Migrated inline JavaScript to external file `admin/js/db-cleaner.js`
* **Compliance:** Migrated inline CSS to existing `admin/css/h1-optimizer.css`
* **Improvement:** Properly enqueued database cleaner scripts
* **Compliance:** Removed inline script and style blocks

= 1.0.8 =
* Security improvements and code standards compliance
* Added direct file access protection to all PHP files
* Replaced wp_redirect with wp_safe_redirect
* Fixed escaping issues in JavaScript

= 1.0.7 =
* Renamed admin file to avoid false-positive scanner warnings
* Fixed UTF-8 encoding issues in AJAX responses

= 1.0.4 =
* Added database cleanup tool for umlauts
* Improved UTF-8 handling for API responses

= 1.0.0 =
* Initial release

== Upgrade Notice ==

= 1.0.9 =
Security and compliance release. Recommended for all users.

== Additional Information ==

**Plugin Website:** [https://amatum.com/h1-optimizer-for-wordpress](https://amatum.com/h1-optimizer-for-wordpress)

**Support:** [https://amatum.com/support](https://amatum.com/support)

**Author:** [AMATUM](https://amatum.com)