=== Black Hole Extracter ===
Contributors: armanbutt
Tags: website importer, elementor, blog importer, featured image, seo, content studio
Requires at least: 5.8
Requires PHP: 7.4
Stable tag: 2.4.2
License: GPLv2 or later

Version 2.4.0
- Adds a dedicated Text-to-Image Studio that generates images from user prompts with Nano Banana and saves them to the WordPress Media Library.
- Adds a plugin-wide light/dark theme toggle with a saved preference and consistent glossy styling.
- Enforces meta descriptions between 120 and 155 characters (maximum 155) while keeping meta titles to 60 characters maximum.
- Adds an Updates screen with installed-version details and transparent instructions; automatic updates require a maintained publisher update feed, which is not bundled.

Version 2.1.0
- Adds OpenRouter as an AI provider using the official OpenRouter Chat Completions endpoint and Bearer-token authentication.
- Defaults OpenRouter to the model router `openrouter/auto`; users can enter a specific model ID supported by their OpenRouter account.
- Adds OpenRouter-specific authentication errors and includes the site's URL/name as optional attribution headers.
- API keys are not bundled. Rotate any key shared in chats or public places before use.

Version 2.0.1
- Adds Google Gemini API as the recommended AI provider, using the official Gemini generateContent REST endpoint and x-goog-api-key header.
- Defaults new installs to gemini-3.8-flash, with an editable model field for other Gemini model IDs available to the account.
- Adds clearer Gemini authentication, permission, empty-response, and provider-error messages in the AI connection test.
- Retains OpenAI, Anthropic, Ollama Cloud, and local Ollama integrations.

Version 1.9.0
- Adds AI Content Studio for original blog posts, service pages, and local landing pages.
- Supports draft, publish-now, and scheduled publishing using the WordPress timezone.
- Adds branded featured-title graphics using selected theme preset, primary/accent colors, typography sizing, and image dimensions.
- Adds configurable Google Gemini, OpenAI API, Anthropic API, Ollama Cloud, and local Ollama providers. API keys are not bundled; credentials are optional until AI features are used.
- Keeps existing import, SEO, website copy, Elementor-compatible import, and checkout exclusion features.

IMPORTANT
- Cloud AI providers may charge usage fees. Create your own key with the provider and configure it in Black Hole > AI & SEO. Do not paste API keys into public posts or support requests.
- Ollama requires a model installed on a machine reachable from the WordPress server. No AI model is bundled.
- Featured images generated by the Content Studio are branded text graphics, not photorealistic AI-generated artwork.
- WordPress scheduled publishing relies on WP-Cron; on low-traffic sites, configure a real server cron for more reliable timing.
- Elementor import is section-level editable HTML, not a guaranteed automatic conversion of every source element into native Elementor Heading, Image, Button, and Container widgets. Complex pages may need manual rebuilding and source CSS/scripts may not be portable.
- Only copy websites and content you own or are authorized to reuse. Authenticated copying uses an existing session and does not bypass access controls.
- Back up your site before updating. Test on staging first.


= 1.9.0 =
* Added homepage-link discovery and per-page selection for authorized full-site copy jobs.
* Copy jobs now process only selected pages rather than automatically crawling every linked page.
* Added select-all/select-none controls and a selected-page count.
* Made the default blog processing concurrency the more reliable single-stream option; users can still choose parallel processing.
* Clarified Elementor import behavior: copied sections are editable HTML widgets, not guaranteed native widget-by-widget conversion.


Ollama Cloud API (v1.9.1)
- In Black Hole Extracter > AI & SEO, select Ollama Cloud API.
- Paste a fresh Ollama API key in the API key field and save.
- The endpoint is set to https://ollama.com/api/chat automatically.
- Default model is gemma4:31b; change it to a model available to your Ollama account if needed.
- Keep API keys private. If a key has been posted in a chat or public place, revoke it and create a new one.
- Test using the Test AI connection button. A successful test confirms API access from your WordPress server.


Ollama Cloud authentication fix (v1.9.2)
- Normalizes common pasted key formats (`Bearer ...` or `OLLAMA_API_KEY=...`) to avoid malformed Authorization headers.
- Uses the documented Ollama Cloud endpoint https://ollama.com/api/chat and Bearer authentication.
- Gives an actionable HTTP 401/403 message explaining how to create a real API key and check account access.
- Accepts any successful 2xx response.
- The plugin cannot make an invalid, revoked, or non-API website/session token valid; create a fresh key at https://ollama.com/settings/keys if authentication still fails.


Google Gemini API (v2.0.1)
- Open https://aistudio.google.com/apikey and create a Gemini API key.
- In WordPress, open Black Hole Extracter > AI & SEO, choose Google Gemini API, paste the key, and save settings.
- Default model is gemini-3.8-flash. If your account does not have access to it, enter another available model ID shown in the official Gemini model list.
- Click Test AI connection. A successful test confirms the WordPress server can reach Gemini with that key and model.
- Never share API keys in chats, screenshots, or public files. Revoke exposed keys and create a replacement.
- The plugin uses Google's documented generateContent endpoint and sends the key in the x-goog-api-key header rather than the URL.

Version 2.2.0 additions
- AI Site Operator: administrator-only task prompt to create draft pages or rewrite a specifically selected page, with SEO metadata and optional featured image. It does not execute arbitrary PHP or silently alter theme/plugin files.
- Nano Banana image generation through Google's Gemini image API (`gemini-2.5-flash-image`) with a separately configurable Gemini API key. If image generation is unavailable, the built-in banner generator is used as a fallback.
- Content Studio supports blog posts, service pages, and location pages; generated content saves SEO title (maximum 60 characters), meta description (maximum 155 characters), focus keyword, and optional featured image. Draft, scheduled, and publish statuses remain available.
- When AI rewriting is enabled during blog import, the imported post receives SEO-focused title, description, focus keyword, slug and image alt text.
- BHE's SEO title/description output is suppressed when Yoast SEO, Rank Math, or AIOSEO is detected to avoid duplicate SEO tags.


= Version 2.3.0 =
* Added PRO SEO Manager for selecting specific posts/pages and bulk-generating metadata.
* Meta titles are capped at 60 characters; meta descriptions at 155 characters.
* Syncs compatible metadata fields for Rank Math, Yoast SEO, and AIOSEO.
* Adds natural internal links to relevant published pages where matching page titles appear.
* Clean, brand-neutral featured image style; generated content images no longer include the Black Hole motif or site-name label.
* SEO bulk processing requires PRO activation and AI provider configuration.

= 2.3.1 =
* Fixed SEO Manager handling of incomplete AI metadata: safe title/content-derived fallback metadata is saved instead of silently skipping selected items.
* Added a persistent top-of-panel status area for progress, results, warnings, and request errors.
* Added a glossy PRO interface, subtle reduced-motion-aware animation, and a persistent dark/light theme toggle.
* Improved per-item result details and refreshes visible character counts after optimization.
