=== ChatSEO – AI Content Writer & SEO Agent for Search Console ===
Contributors: chatseo
Tags: seo, ai writer, search console, ai seo, content writer
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.2
Stable tag: 1.3.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

AI content writer and SEO agent: finds SEO opportunities in Google Search Console, writes blog posts, updates your Yoast or Rank Math meta.

== Description ==

**ChatSEO is an AI SEO agent and AI content writer that works on your real Google Search Console data.** It finds the pages and keywords where you can win traffic, writes SEO blog posts, optimizes your existing content, and publishes the changes straight to WordPress. This plugin is the free connector that lets [ChatSEO](https://chatseo.app) work on your site.

= What you can do with ChatSEO =

* **Find SEO opportunities** in your Google Search Console data: pages stuck on page 2, keywords with impressions but few clicks.
* **Write SEO blog posts** with an AI writer that starts from a content brief, in the look of your site, signed by your real authors, with an FAQ and structured data.
* **Optimize existing posts**: rewrite titles, meta descriptions and sections without breaking your Gutenberg, Classic or Elementor layout.
* **Update your SEO plugin** (Yoast SEO, Rank Math, All in One SEO, SEOPress) from one place.
* **Audit any page** and get a prioritized SEO action plan.

ChatSEO works with your SEO plugin, it does not replace it.

= How the plugin works =

ChatSEO is the official connector plugin for [ChatSEO](https://chatseo.app), an AI assistant for SEO. Once installed and connected with an Application Password, it lets the ChatSEO app read and update your SEO metadata and edit your post content remotely, while respecting your site's permissions.

The plugin exposes a small set of authenticated REST API endpoints (namespace `chatseo/v1`) that the ChatSEO app calls on your behalf. Every endpoint requires an authenticated user with the `edit_posts` capability, and per-post writes additionally check the `edit_post` capability for the targeted post. The plugin never creates, edits or deletes WordPress users.

**What the plugin does:**

* **Reads your SEO metadata** by detecting your active SEO plugin and exposing its title, description and focus keyword through the REST API.
* **Writes SEO metadata** (title, description, keyword) back to your active SEO plugin.
* **Reads and edits post content in a builder-aware way.** It detects the editor used for each post (Gutenberg, Classic, Elementor) and applies targeted text edits in that builder's native format, without breaking the layout.
* **Converts HTML to Gutenberg blocks** so content created in ChatSEO is recognised by the block editor.
* **Adds structured data (JSON-LD) to articles published by ChatSEO.** With Yoast SEO or RankMath active, it only adds the FAQ to their schema graph, which already describes the article and its author. Without them, it prints the full graph in the page `<head>`. In both cases the author is the WordPress author of the post, so the markup names the person who signs the article on the page.
* **Lists author profiles (read only).** ChatSEO reads the public profile of the users who can write posts (display name, biographical info, website, avatar and the social profiles filled in Yoast SEO or RankMath) so you can pick who signs an article. The plugin never modifies a user profile.
* **Dresses articles published by ChatSEO like your own.** ChatSEO reads how one of your articles is displayed, and stores a stylesheet on your site that only applies to the articles it published. To cover what that article does not show, it briefly creates a private sample post, reachable only through a secret link, never published or listed, and deleted right after the reading. Storing the stylesheet requires an administrator account.

**Supported SEO plugins:**

* Yoast SEO (wordpress-seo)
* RankMath (seo-by-rank-math)
* All in One SEO (all-in-one-seo-pack)
* SEOPress (wp-seopress)

**Supported content builders:**

* Gutenberg (block editor)
* Classic editor
* Elementor

The plugin only registers the meta fields for the SEO plugin you actually have active, keeping the REST API output focused and lightweight.

== External services ==

The plugin itself never sends a request from your server. It answers the requests of the ChatSEO app, and on some pages it asks your visitors' browsers to load a file from one of the services below.

= ChatSEO =

This plugin connects your WordPress site to ChatSEO, a third-party SEO assistant service provided by ChatSEO. This connection is required for the plugin to be useful.

* What it is used for: the ChatSEO app calls the plugin's authenticated REST API endpoints to read and write your SEO metadata, post content and article stylesheet, and to read the public profile of your authors. It only does so with the credentials (an Application Password) that you generate and provide to ChatSEO.
* What data is sent, and when: when ChatSEO calls these endpoints, your site returns the post content and SEO metadata of the posts you manage in ChatSEO, the public profile of the users who can write posts (display name, biographical info, website, avatar and social profiles, never their email address or login), and your site URL. When ChatSEO reads the look of your articles, it briefly opens a private sample post, through a secret link that expires after 10 minutes.
* Author photos: on sites where an earlier version of the plugin received an author photo from ChatSEO, that image stays hosted by ChatSEO, and your visitors' browsers load it from ChatSEO wherever WordPress shows that author's avatar. The request carries the visitor's IP address and browser details, as for any image. Version 1.3.0 and later never set an author photo.

Terms of service: https://chatseo.app/terms
Privacy policy: https://chatseo.app/privacy

= Google Fonts and Bunny Fonts =

When the stylesheet ChatSEO derived from your articles uses a web font from Google Fonts or Bunny Fonts, the articles published by ChatSEO load that font from that service. No other page loads it.

* What it is used for: displaying the articles published by ChatSEO with your site's fonts.
* What data is sent, and when: each time a visitor opens one of these articles, their browser requests the font stylesheet and font files, which sends the visitor's IP address and browser details to the font service.

Google Fonts, provided by Google: terms of service https://policies.google.com/terms, privacy policy https://policies.google.com/privacy
Bunny Fonts, provided by BunnyWay: terms of service https://bunny.net/tos/, privacy policy https://bunny.net/privacy/

== Installation ==

1. Install the plugin through the WordPress plugins screen (search for "ChatSEO"), or upload the plugin files to the `/wp-content/plugins/chatseo/` directory.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. In your WordPress profile, generate an Application Password and connect your site from the ChatSEO app.
4. (Optional) Install one of the supported SEO plugins so ChatSEO can read and write your SEO metadata.

== Frequently Asked Questions ==

= Is ChatSEO an alternative to Yoast SEO or Rank Math? =

No, it works on top of them. Your SEO plugin keeps handling your sitemaps and tags, and ChatSEO fills its title, meta description and focus keyword for you, based on your Search Console data.

= Does ChatSEO use Google Search Console? =

Yes. You connect Search Console in the ChatSEO app, and the AI SEO agent uses your real clicks, impressions and positions to choose what to write and what to optimize.

= Do I need a ChatSEO account? =

Yes. This plugin is a connector for the ChatSEO app. You connect your site to ChatSEO using a WordPress Application Password, and ChatSEO uses the plugin's endpoints to manage your content.

= Which SEO plugins are supported? =

Yoast SEO, RankMath, All in One SEO Pack and SEOPress. The plugin detects the first active one in that priority order. We recommend using only one SEO plugin at a time.

= Do I need to configure anything in the plugin? =

No. There is no settings page. Once activated, the plugin detects your active SEO plugin and content builder automatically. All configuration happens on the ChatSEO side.

= What happens if I don't have any SEO plugin installed? =

The plugin still works for content editing. SEO metadata reads return empty values and SEO writes have no target until a supported SEO plugin is active.

= Is this plugin secure? =

Yes. Every endpoint requires an authenticated user with the `edit_posts` capability, per-post writes check the `edit_post` capability for the targeted post, user profiles are only read (never modified), all input is sanitized using WordPress standards (`sanitize_text_field`, `wp_kses_post`), and direct file access is blocked.

== Screenshots ==

1. Your top SEO opportunities, ranked from your Google Search Console data.
2. Content brief: the angle, the outline and what the ranking pages lack.
3. A finished AI-written article with its featured image, ready to publish.
4. Connect your WordPress site in one step with an Application Password.
5. Page audit with a proposed title and a rewrite plan.

== Changelog ==

= 1.3.0 =
* Authors: the plugin no longer modifies WordPress user profiles. The endpoint that let ChatSEO update an author's name, biographical info, website, social profiles and photo is removed. ChatSEO only reads the authors' public profile.

= 1.2.1 =
* Article style: the stylesheet and its web fonts are loaded through the WordPress style queue.
* Security: the focus keyword of a post is only readable through the REST API by users who can edit that post.
* Requires WordPress 6.5 or later.

= 1.2.0 =
* Article style: articles published by ChatSEO take the look of your site's articles, through a stylesheet that only applies to them. An administrator account is required to store it.

= 1.1.1 =
* Authors: with Yoast SEO or RankMath, the synced social profiles fill their profile fields (X username, Facebook, LinkedIn…), and the ones already filled there are listed to ChatSEO.
* Structured data: a social profile already in the author markup is not added twice, even when written differently (twitter.com and x.com).

= 1.1.0 =
* Structured data: ChatSEO can send a JSON-LD document (Article, BlogPosting, Person, FAQPage) with an article. It is strictly validated, then added to the Yoast SEO or RankMath schema graph without duplicating their Article or author, or printed in the page head when no SEO plugin is active.
* Structured data: the author in the markup is the WordPress author of the post. Without an SEO plugin, it is built from their profile; with Yoast SEO or RankMath, their author is completed with the bio, website and social profiles synced from ChatSEO, without overwriting existing values.
* Authors: new endpoints to list the users who can write posts and to update their profile (display name, biographical info, website, social profiles, photo). Updating another user requires the `edit_user` capability.
* Authors: a photo set from ChatSEO replaces the user's avatar everywhere WordPress displays it.
* The status endpoint lists the plugin capabilities.

= 1.0.1 =
* Require PHP 8.2 or later. PHP 8.1 and older no longer receive security fixes (CVE-2026-109618, CVE-2026-109619).

= 1.0.0 =
* Initial release.
* Automatic SEO plugin detection (Yoast, RankMath, AIOSEO, SEOPress).
* Read and write SEO metadata via the REST API.
* Builder-aware content reading and editing (Gutenberg, Classic, Elementor).
* HTML to Gutenberg blocks conversion.
* Authenticated REST endpoints with capability checks and input sanitization.

== Upgrade Notice ==

= 1.3.0 =
ChatSEO can no longer edit WordPress user profiles: author profiles are read only.

= 1.2.1 =
Requires WordPress 6.5 or later.

= 1.1.1 =
The social profiles synced from ChatSEO now show in the Yoast SEO or RankMath fields of the WordPress profile.

= 1.1.0 =
Adds structured data (JSON-LD) to the articles published by ChatSEO, and syncs author profiles completed in ChatSEO.

= 1.0.1 =
Requires PHP 8.2 or later. Ask your host to upgrade PHP before updating.

= 1.0.0 =
Initial release of the ChatSEO connector plugin.
