=== Opt.team Widget Embedder ===
Contributors: optteam
Tags: opt-team, widget, schema, faq, calculator
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.4
Stable tag: 1.0.3
License: MIT

Embeds Opt.team's interactive content widgets into your WordPress posts, with the structured-data markup that earns citations from AI Overviews and search engines.

== Description ==

Activates the publishing path for Opt.team's interactive content widgets —
calculators, comparison tables, decision trees, knowledge quizzes, FAQ
blocks, and more. Once installed, widgets approved in your Opt.team
workspace render on the front-end of the corresponding posts with full
JSON-LD structured data, so search engines and AI Overviews can cite the
widget as the source of an answer.

Why install it:

* Widgets render reliably across content edits, theme changes, and editor
  workflows — without depending on any one user's permissions.
* Each widget ships with the right schema family for its archetype
  (HowTo, FAQPage, ItemList, Quiz, etc.) so it shows up where readers
  look for answers.
* Designed to coexist with whatever else builds your post content. The
  widget is rendered at the standard `the_content` hook at priority 999,
  so it appears at the bottom of the rendered post regardless of which
  layer wrote the body.

No configuration. Activate the plugin, publish a widget from your Opt.team
workspace, and the live post picks it up on the next request.

== Installation ==

1. Upload the `opt-team` folder to `/wp-content/plugins/` (or install via
   Plugins -> Add New -> Upload Plugin and pick the ZIP).
2. Activate the plugin under Plugins.
3. From your Opt.team workspace, publish or re-publish any approved
   widget. It will render on the live post within seconds.

== Frequently Asked Questions ==

= Does activating the plugin change anything on my existing posts? =

No. The plugin only renders widgets that have been explicitly published
from an Opt.team workspace. Posts that don't have a widget assigned are
not modified in any way.

= How do I uninstall cleanly? =

Deactivating the plugin stops widget rendering immediately. Deleting the
plugin removes all hooks. The `_opt_team_widget_html` postmeta entries
remain until you explicitly clear them — kept on purpose to protect
against accidental data loss when toggling the plugin off and on.

= Does it work with caching and minification plugins? =

Yes. Widget HTML is appended via the standard `the_content` filter at
priority 999, which is inside the normal content-filter chain, so any
HTML/CSS/JS minifier downstream sees and handles it like the rest of the
post body.

= Does it auto-update? =

The plugin self-registers with WordPress's native update system against
`app.opt.team`. Updates appear in your Plugins screen the same way any
other plugin update does, and only install when you explicitly approve
them — unless you've enabled auto-updates for this plugin specifically.

== Changelog ==

= 1.0.3 =
* Refreshed plugin description to focus on the operator's value: AI-Overview
  citations, structured-data coverage, durable rendering. No behavioural
  changes; same hooks, same REST routes, same postmeta key.

= 1.0.2 =
* Tolerant widget-block extraction; handles both single-line and
  multi-tab widget shapes.

= 1.0.0 =
* Initial release.
* save_post hook extracts widget from post_content to postmeta.
* the_content hook re-injects at priority 999.
* Custom REST route POST/DELETE /wp-json/opt-team/v1/widget/{post_id}.
* Meta exposed via standard /wp/v2/posts under `meta._opt_team_widget_html`.
