=== AMATUM H1 Optimizer ===
Contributors: amatum
Tags: seo, h1, headlines, titles, ai, openrouter, permalink, 301 redirect, content optimization
Requires at least: 6.7
Tested up to: 7.0
Stable tag: 1.0.4
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 (DeepSeek/OpenRouter). Includes automatic permalink optimization and 301 redirects.

== Description ==

The **AMATUM H1 Optimizer** is a lightweight WordPress plugin that generates SEO-optimized H1 headlines from your page or post content. With the help of AI (DeepSeek/OpenRouter), you receive three tailored suggestions – applied with one click. Optionally, the permalink is automatically adjusted, including a 301 redirect to maintain SEO value.

= 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 (SEO-safe!)
* 📦 **Backup Function** – Stores the original H1 for later restoration
* 🔌 **Wide Compatibility** – Works with Rank Math, Yoast, Elementor, WooCommerce, WPML
* 🌍 **Multilingual** – German and English included (easily translatable)
* 🛡️ **GDPR Compliant** – No external requests without explicit action

= Why Choose AMATUM H1 Optimizer? =

* **No API key required** – A free API key is pre-configured and ready to use
* **SEO-safe redirects** – Old URLs automatically forward to new ones (301)
* **Database cleanup tool** – Fixes incorrectly encoded umlauts (ä, ö, ü, ß) across your entire site
* **Developer friendly** – Extensive hooks and filters for customization
* **Privacy focused** – No tracking, no hidden backlinks, no data collection

== Installation ==

1. Upload the `amatum-h1-optimizer` folder to the `/wp-content/plugins/` directory, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Go to **Settings → H1 Optimizer** to configure the plugin (a free API key is already pre-configured).
4. Start editing a post or page – you will find the "H1 Optimization" button in the editor sidebar (Gutenberg) or as a meta box (Classic Editor).

== Frequently Asked Questions ==

= Do I need my own API key? =

No. A free API key is pre-configured and ready to use. However, if you have your own OpenRouter account, you can enter your personal key in the plugin settings.

= Does this work with Elementor? =

Yes. Elementor stores post titles and content in standard WordPress fields, so the plugin works seamlessly with Elementor.

= What happens to my old URLs when I update the permalink? =

When the "Auto-update permalink" option is enabled, the plugin automatically creates a **301 redirect** from the old URL to the new one. This preserves your SEO rankings and ensures visitors reach the correct page.

= Will this work on existing posts and pages? =

Yes. The plugin works on all existing posts and pages – simply edit any page and click the "H1 Optimization" button.

= How do I uninstall the plugin? =

Simply deactivate and delete the plugin from the WordPress admin. All custom database tables will be automatically removed.

= Is the plugin compatible with PHP 8.x? =

Yes, the plugin requires PHP 8.0 or higher and is fully compatible with PHP 8.1, 8.2, and 8.3.

== Screenshots ==

1. The H1 Optimization button in the Gutenberg editor sidebar.
2. Popup with three AI-generated H1 suggestions.
3. Plugin settings page with all configuration options.
4. Database cleanup tool for fixing incorrectly encoded umlauts.

== Changelog ==

= 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.0.4 =
* Added database cleanup tool for fixing incorrectly encoded umlauts
* Added documentation section with links to PDF and HTML manual
* Improved UTF-8 handling for API responses
* Fixed undefined array key warnings in settings page
* Switched to openrouter/free model for better reliability

= 1.0.3 =
* Fixed UTF-8 encoding issues for umlauts
* Improved API error handling
* Added manual override option for permalink updates

= 1.0.0 =
* Initial release
* AI-powered H1 headline generation (DeepSeek/OpenRouter)
* Automatic permalink optimization with 301 redirects
* Original H1 backup functionality
* Gutenberg and Classic Editor support
* Settings page for API configuration
* German and English localization

== Upgrade Notice ==

= 1.0.4 =
Adds a powerful database cleanup tool. Recommended for all users who have incorrectly encoded umlauts in their post titles.

== 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)