=== Push Post to MaxGood.work ===
Contributors: maxgoodwork
Tags: webhook, publishing, api, maxgood, avatar
Requires at least: 5.0
Tested up to: 6.6
Requires PHP: 7.2
Stable tag: 1.2.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Automatically push new WordPress posts and pages (title + content) into the “Expertise” of your MaxGood.work Essential or Enterprise Avatar.

== Description ==

**Push Post to MaxGood.work** automatically sends newly published blog posts (and optionally pages) from WordPress to the Expertise of a MaxGood.work Essential or Enterprise Avatar.  
It transmits the post’s title and content (without theme wrappers or binaries); MaxGood.work stores them as Markdown under the post’s title.

This plugin is designed for MaxGood.work customers with an Essential or Enterprise Avatar, whose plans include the API. To learn more, visit [https://maxgood.work](https://maxgood.work).

== Features ==

* Fires automatically when a new post or page is first published.
* Adds an action to push existing posts or pages.
* Sends the post content (cleaned of images/binaries), stored by MaxGood.work as Markdown.
* Names each stored document after the post’s title.
* Choose the Expertise title from a list on the Settings page, using your MaxGood.work **API key**; optionally push pages too.
* Secure transport over HTTPS with the API key in the Authorization header.
* Super simple — no updates or deletions are pushed.

== Installation ==

1. Upload the plugin ZIP through **Plugins → Add New → Upload Plugin** in your WordPress admin, or extract it to `wp-content/plugins/push-post-to-maxgoodwork/`.
2. Activate the plugin through the **Plugins** menu.
3. Go to **Settings → Push to MaxGood.work** and enter:
   * **MaxGood.work API key** – An Avatar Owner or Admin of an Essential or Enterprise Avatar creates it in MaxGood.work: Avatar Admin, “Account” tab, “API Credentials” section, type a label and select “Create Key”. The key is shown once.
   * **Expertise title** – After you save the key, choose the title from the list.
   * **push pages** - check this box to automatically push new pages.
4. Publish a new post — it will automatically be sent to MaxGood.work and be integrated into your Avatar's knowledge.

== Frequently Asked Questions ==

= Do I need a MaxGood.work account? =
Yes. The plugin works with Essential and Enterprise Avatars on MaxGood.work, whose plans include the API and its keys. Get one at [https://maxgood.work](https://maxgood.work).

= Does it support post updates or deletions? =
No. This version only sends new posts when they are first published and allows you to send existing posts with an admin action.

= What content is sent? =
The plugin sends the post’s title and body, which MaxGood.work stores as Markdown in a document named after the post. Images and other binary objects are stripped.

= If I push a post again, is the first copy replaced? =
No. Each push adds another copy of the post to the title.

= What happens to my API key when I delete the plugin? =
Deleting the plugin in WordPress deletes its settings, including the API key, and the marker it stores on each pushed post. Deactivating the plugin keeps them. To stop the key working, revoke it in MaxGood.work: Avatar Admin, “Account” tab, “API Credentials” section.

== Changelog ==

= 1.2.1 =
* Work with Essential Avatars as well as Enterprise Avatars; the key is created in the Avatar Admin “Account” tab, “API Credentials” section.

= 1.2.0 =
* Use the MaxGood.work Public BETA API with an Avatar API key: uploads are accepted again.
* Replace the Avatar id setting with a MaxGood.work API key; the key is checked when saved.
* Choose the Expertise title from a list that shows each title’s name and creation date.
* Show clear notices when the key is refused, the title is not found or the post is too large.
* "Push to MaxGood.work now" reports a post as pushed only when MaxGood.work accepted it, and otherwise says why, including a missing API key or title.
* Deleting the plugin deletes its settings, including the API key, and its markers on pushed posts.
* Add an optional MGW_API_BASE setting in wp-config.php to use another environment.

= 1.1.0 =
* Fix silent upload failures: requests are now blocking with response validation.
* Show error notices in WordPress admin when uploads fail (manual and auto-publish).
* Add retry link for failed auto-publish uploads on the post edit screen.
* Idempotency meta is now only set on successful uploads.

= 1.0.1 =
* Make post/page pushes include the title in the content.

= 1.0.0 =
* Initial release: Pushes new posts to MaxGood.work on publish.

== Upgrade Notice ==

= 1.2.1 =
The plugin works with Essential Avatars as well as Enterprise Avatars. Create the API key in the Avatar Admin “Account” tab, “API Credentials” section.

= 1.2.0 =
Enter a MaxGood.work API key, which replaces the Avatar id setting, and choose the title from the list. Only Enterprise Avatars can create API keys.

= 1.0.0 =
First release.

== Disclaimer ==

This plugin is provided *as is* and *without any warranty or guarantee of any kind*. By downloading or installing it, you accept full responsibility for its use. MaxGood.work makes no promises about performance, reliability, security, or fitness for any particular purpose.

Because the internet is inherently insecure, we strongly recommend that you scan all downloaded files with reputable antivirus or malware detection tools before installing them on your WordPress site.

To the fullest extent allowed by law, MaxGood.work and its contributors are not liable for any damages, data loss, or other issues that may result from using this software. Use it entirely at your own risk.
