=== WunderGoal — Football Picks & Pools ===
Contributors: skipseek
Tags: football, soccer, pick em, prediction pool, predictions
Requires at least: 6.2
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 0.5.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Turn your site into a football picking game — your readers pick winners without leaving your page, and your pool's live standings sit alongside.

== Description ==

**Give your readers something to do.**

Drop the next fixtures onto any post or page. Each one gets three buttons — home, draw, away — and your readers pick right there. No redirect, no pop-up, no account, no setup.

`[wundergoal_picks]`

That is the whole installation. The fixtures come from every competition WunderGoal covers, or point it at one:

`[wundergoal_picks competition="premier-league-2026" count="10"]`

= Running a pool as well? =

Create a free pool at [wundergoal.com/pool](https://wundergoal.com/pool) — there are eight ways to play (Predictions, Survivor, Bracket, Confidence, Outrights, Props, Joker and Auto-pick) — then publish its live standings next to your picks:

`[wundergoal_pool]`

Weekly, monthly and all-time leaderboards run alongside every pool and they reset, so it never matters when someone joined.

= How the picking works =

The fixtures are fetched server-side, cached in a WordPress transient, and printed as plain markup that inherits your theme. Nothing is embedded and no third-party script runs in a visitor's browser.

A pick is a normal WordPress form post, so **it works with JavaScript disabled**. With JavaScript on, the same pick is saved without a page reload. Either way the pick goes to WordPress, and WordPress forwards it to WunderGoal — the reader's browser never talks to us directly, so nothing depends on third-party cookies, which most browsers now block.

Readers are identified only by a random token this plugin stores in a first-party cookie on **your** domain. When somebody wants their picks scored, a link appears offering to save them to a free WunderGoal account.

= Works with page caching =

The HTML is identical for every visitor. Which buttons a given reader has lit is applied in their own browser from their own cookie, so a cached page can never show one reader's picks to another.

= Blocks and shortcodes =

* **Football Picks** block, or `[wundergoal_picks]` — the upcoming fixtures with a pick form on each. Attributes: `competition`, `count` (1–20), `theme`.
* **Pool Standings Board** block, or `[wundergoal_pool]` — your pool's live table. Attributes: `code`, `theme`.

Set your pool code and a default theme under **Settings → WunderGoal Pools**, or override either per placement.

= Privacy =

The picks board sets two first-party cookies on your own domain, and only once a reader actually picks something: a random token that identifies nothing but that bag of picks, and the picks themselves so the page can show them back. No name, no email, no account, no tracking, and nothing readable by any other site.

The standings board sets no cookies at all and renders nothing without a pool invite code — possession of the code is what grants access to that pool's table.

== External services ==

This plugin talks to **WunderGoal** (https://wundergoal.com), a football prediction service run by SkipSeek.

* **Fixtures** — the plugin requests the upcoming fixture list from `https://wundergoal.com/embed/picks/data` when a picks board is rendered. No visitor information is sent.
* **Pool standings** — when you have set a pool invite code, the plugin requests that pool's standings from `https://wundergoal.com/embed/pool/{code}/data`. Only the code you configured is sent.
* **Picks** — when a reader presses a pick button, your server sends WunderGoal the match, the choice, the random visitor token described above, and your site's address. No personal data is sent, and the reader's browser never contacts WunderGoal.

Terms: https://wundergoal.com/terms — Privacy: https://wundergoal.com/privacy

WunderGoal is an independent product of SkipSeek and is not affiliated with, endorsed by, or connected to FIFA or any national federation.

== Frequently Asked Questions ==

= Do my readers need an account? =

No. Anyone can pick straight away, and their picks are remembered on your site. An account is only needed if they want those picks scored and counted on WunderGoal's leaderboards — a link offering that appears once they have picked something.

= Do I need a pool to use this? =

No. `[wundergoal_picks]` works on its own and needs no setup at all. The pool board is for publishers who want to run a league with their readers.

= Where do I find my pool invite code? =

On your pool page at wundergoal.com, under "Embed your pool".

= Does this load an iframe or any third-party scripts? =

No. Everything is fetched server-side and rendered as native HTML in your theme.

= Will this slow my site down? =

No. Responses are cached in a transient for a few minutes, so a busy page makes at most one outbound request every few minutes rather than one per visitor.

== Screenshots ==

1. The pick form — three buttons on every upcoming match, rendered natively in a post
2. A pool's live standings board below the picks
3. The Football Picks block in the editor, with its inspector controls
4. Settings — a default theme, and your pool's invite code

== Changelog ==

= 0.5.0 =
* New: the **Football Picks** block and `[wundergoal_picks]` — a real pick form on every upcoming match. Readers pick without leaving your page, with no account and no setup.
* Works without JavaScript (a plain form post) and safely behind a page cache: the picked state is applied per-reader in their own browser, never rendered into cached HTML.
* Readers can save their picks to a free WunderGoal account afterwards and keep them.
* Repositioned around the picking game. The plugin published standings and nothing else, so the only thing a reader could do on a publisher's page was look at other people's scores.
* Renamed to "WunderGoal — Football Picks & Pools". Existing `[wundergoal_pool]` placements, blocks and settings are unchanged.
* Documented the pick submission in the readme's external services section: what your server sends to WunderGoal when a reader picks, and what it does not.
* Hardened the pick endpoint: picks from one visitor IP are capped per hour before your server makes any outbound request, so a flood of forged pick posts cannot be turned into outbound traffic from your site.

= 0.4.1 =
* Corrected the pool-format list in the description: WunderGoal now has six formats (Predictions, Survivor, Bracket, Confidence, Outrights, Props). Joker and Auto-pick are no longer formats of their own — doubling your Big Call and auto-picking are options you can switch on for any format. No functional change to the board.

= 0.4.0 =
* Removed the "Powered by WunderGoal" credit link from the front end entirely. The plugin now adds no attribution of any kind to public pages.
* Documented the external service in the readme: what the WunderGoal pool data API is used for, exactly what is sent and when, and links to its Terms of Service and Privacy Policy.

= 0.3.0 =
* Native rebuild: standings are now fetched server-side and rendered as theme-inheriting HTML — no iframe, no external scripts in the visitor's browser.
* Short server-side transient cache with a long-lived backup, so an API blip never blanks the board.
* Format-aware columns (classic, survivor, bracket, confidence).

= 0.2.0 =
* Rebuild around prediction pools (superseded by the native 0.3.0 renderer).

= 0.1.0 =
* Initial submission (superseded).

== Upgrade Notice ==

= 0.5.0 =
Adds a real pick form: readers pick winners on your page, with no account and no redirect. Existing pool placements are unchanged.
