=== Webalyze Connector ===
Contributors: webalyzeai
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 3.0.0
License: GPLv2 or later

Connect WordPress to Webalyze so chat can manage pages, posts, content, styles, and media.

== Description ==

Install this plugin on the WordPress site you want Webalyze to control.

1. Activate the plugin.
2. Open Settings → Webalyze Connector.
3. Copy the Site URL and API key into Webalyze → Connections → WordPress.
4. Ask Webalyze chat to list pages, create posts, edit content, publish, or change styles.

Anyone with the API key can create, edit, publish, and delete content. Keep it private.

== REST API ==

Base: `/wp-json/webalyze/v1/`

Auth: `Authorization: Bearer <api_key>` or `X-Webalyze-Key: <api_key>`

* GET `/status` — health + capabilities
* GET/POST `/site` — site info / update name, description, styles
* GET `/content` — list pages/posts (`type`, `search`, `status`, `per_page`)
* GET `/content/{id}` — full content (HTML/blocks)
* POST `/content` — create page/post
* POST|PATCH|PUT `/content/{id}` — update title, content, status, taxonomies, styles
* DELETE `/content/{id}` — trash (or `?force=true`)
* GET/POST `/styles` — site-wide background styles
* GET/POST `/pages/{id}/styles` — per-page styles
* GET/POST `/media` — list / sideload image from URL
* GET `/taxonomies/categories` · `/taxonomies/tags`

Legacy: GET `/pages` still lists content.

== Changelog ==

= 3.0.0 =
* Enqueue front-end CSS with wp_enqueue_style() / wp_add_inline_style() instead of echoing a style tag.

= 2.0.0 =
* Full content CRUD (pages/posts), publish/draft, media sideload, taxonomies, site settings.
* Keeps style endpoints from 1.x.

= 1.0.0 =
* Initial release with API key auth and background color updates.
