=== Update Feed ===
Contributors: (your org)
Tags: live blog, live feed, embed, updates
Requires at least: 5.0
Tested up to: 6.6
Requires PHP: 7.2
Stable tag: 1.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Turn a WordPress Page into your full Update live-coverage reader — sign-in, posting, follow, notifications, everything — with no file uploads, no FTP, no theme editing.

== Description ==

If you use Update to run live event coverage, this plugin gets your whole reader page live on WordPress in a few clicks — the same complete experience the Update admin portal's "Generate reader page" download produces, but fetched live instead of uploaded once and left to go stale.

**Two ways to use it, in order of what we recommend:**

1. **Full page (recommended).** Create a Page, set its Template to **Update Reader (Full Page)**, publish. That page IS the reader — sign-in, composing updates, following, notifications, all of it — with nothing else from your WordPress theme on it. Fetched live from your Update API every time the cache expires (60 seconds), so it never goes stale the way a one-time-downloaded `index.html` would.
2. **Shortcode teaser (secondary).** `[update_feed event="NGR2027"]` drops a lightweight, **read-only** feed preview into an existing post or page — no sign-in, no posting. Good for a teaser inside a blog post that links out to your full-page reader.

Both call Update's existing public, API-key-gated endpoints directly — **no backend changes were needed** to support either one, and no reader data ever passes through or is stored by WordPress itself.

== Installation ==

1. Upload the `update-feed` folder to `/wp-content/plugins/`, or install the zip via **Plugins → Add New → Upload Plugin**.
2. Activate the plugin through the **Plugins** menu.
3. Go to **Settings → Update Feed** and enter your API base URL and public API key (from your Update admin portal's API keys page).
4. **For the full page:** create a new **Page**, and under **Page Attributes** in the sidebar, set **Template** to **Update Reader (Full Page)**. Publish.
5. **For the shortcode instead/also:** add `[update_feed event="YOUR_EVENT_CODE"]` to any post, page, or text/HTML widget.

== Shortcode reference ==

`[update_feed]` — all attributes optional, falling back to your Settings page defaults:

* `event` — the event code (e.g. `NGR2027`).
* `key` / `api` — override the API key / base URL for this one embed.
* `limit` — how many updates to show (1–50, default 20).
* `poll` — auto-refresh interval in seconds (0 disables, default 30).
* `likes` — `true`/`false`, show like buttons (default true).
* `height` — CSS max-height for a scrollable feed, e.g. `height="500px"`.

The full-page template has no shortcode attributes to configure — it always shows whichever event is
currently live for your organization, automatically, with no republishing needed when that changes.

== Frequently Asked Questions ==

= What's the difference between the full page and the shortcode? =

The full page is the **entire** reader experience (readers can sign in, post updates, follow people/events/your organization, get notifications) and takes over the whole WordPress page it's assigned to. The shortcode is a much smaller, **read-only** feed list you drop inside an existing page alongside other content — no sign-in or posting there.

= Is my API key safe to use here? =

It's a **read-only, revocable** public key — it can only read approved updates and drive read-only reader actions for events your organization owns, and you can revoke it any time from the admin portal. You can revoke and replace it at any time without touching this plugin's code.

= Does the full-page template still use my WordPress theme (header, footer, sidebar)? =

No — by design. The whole point is that the reader page needs full control the same way it would if you'd uploaded it directly to your host. If you want the shortcode's lighter, "inside my theme" embed instead, use that on a different page.

= Can I use both on the same site? =

Yes — a full-page reader at, say, `/live`, and shortcode teasers embedded in blog posts or your homepage that link to it.

== Changelog ==

= 1.1.0 =
* Added the "Update Reader (Full Page)" page template — the new recommended way to use this plugin.

= 1.0.0 =
* Initial release: settings page + `[update_feed]` shortcode.
