=== StatsAI Football Widget ===
Contributors: statsai
Tags: football, soccer, widget, predictions, sports
Requires at least: 6.3
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

The next match of your club with AI chances for 1, X and 2, over 2.5 goals, both teams to score and form. Free, no cookies, updates itself.

== Description ==

StatsAI Football Widget puts the next match of any club from 9 football leagues on your site: Premier League, La Liga, Serie A, Bundesliga, Ligue 1, Eredivisie, Primeira Liga, Serbian SuperLiga and Hungarian NB I.

The widget shows:

* the next match with crests, kick-off time and date
* AI chances for home win, draw and away win (1, X, 2)
* the chance of over 2.5 goals and of both teams scoring
* the club's form, league position and last result
* after the match: the final score, the half-time score and whether the top pick won

After every round the widget moves on to the club's next match by itself, so you set it up once.

**Ways to add it**

* Block: "StatsAI Football Widget" in the block editor and in block widget areas, with a searchable club list.
* Classic sidebar widget for older themes.
* Shortcode anywhere: `[statsai_widget team="arsenal"]`, with optional `lang="en|sr|hu"` and `theme="dark|light"`.
* A single match: `[statsai_widget match="https://statsai.bet/en/match/2026-11-22/arsenal-vs-wolverhampton-wanderers"]` (copy the address of a match page on statsai.bet).

**Good to know**

* Free, no account, no API key and no limit on views.
* No cookies, no ads and no analytics scripts on your site. The plugin loads no remote scripts; the widget is an iframe.
* Dark and light look; the widget adapts to the width (up to 440 px) and sets its own height.
* Widget languages: English, Serbian and Hungarian.
* The widget shows statistical estimates, not betting advice and not guarantees. Its content is intended for adults (18+).

== External services ==

This plugin shows content from StatsAI (https://statsai.bet), a football statistics service run by the plugin author. Without it the widget cannot show anything.

* **Widget (iframe):** every time a page with the widget is viewed, the visitor's browser loads the widget from `https://statsai.bet/embed/t/...` (club) or `https://statsai.bet/embed/m/...` (single match). Like any web request, this sends the visitor's IP address, browser user agent and the address of the page (referrer) to statsai.bet. StatsAI counts the number of widget views per day and the host name of the site that shows the widget. It sets no cookies and stores no personal data about visitors.
* **Club list:** when an administrator opens the block editor, the widget settings or Settings > StatsAI Widget, the site requests `https://statsai.bet/embed/teams.json` to fill the club list. No data about the site's visitors is sent. The list is cached for 12 hours.
* **Images and links inside the widget:** club crests are loaded from statsai.bet. The buttons inside the widget open pages on statsai.bet and, for "Follow on Telegram", the StatsAI Telegram bot (https://telegram.org/privacy) in a new tab, only when the visitor clicks them.

StatsAI terms of use: https://statsai.bet/terms.html
StatsAI privacy policy: https://statsai.bet/privacy.html

== Installation ==

1. In your dashboard go to Plugins > Add New, search for "StatsAI Football Widget" and click Install, then Activate.
2. Optional: Settings > StatsAI Widget to choose the default language and look.
3. Add the "StatsAI Football Widget" block to a post, page or widget area and choose a club, or use the shortcode.

== Frequently Asked Questions ==

= Is it free? =

Yes. There is no account, key or paid plan.

= Does it slow my site down? =

The plugin adds one small script (under 1 KB) and one small stylesheet, only on pages that show the widget. The widget iframe loads lazily, when it scrolls into view.

= Does it set cookies? =

No. Neither the plugin nor the widget sets cookies. See "External services" above for what the widget request sends to statsai.bet.

= Which clubs are available? =

Every club from the Premier League, La Liga, Serie A, Bundesliga, Ligue 1, Eredivisie, Primeira Liga, Serbian SuperLiga and Hungarian NB I. The list in the block and in the widget settings is always current.

= When does the AI prediction appear? =

The day before kick-off. Until then the widget shows the date, form, league position and the club's season averages for goals.

= Can I show a single match instead of a club? =

Yes. Open the match page on statsai.bet, copy its address and use it in the shortcode: `[statsai_widget match="https://statsai.bet/en/match/..."]`.

= Is there a link to StatsAI on my site? =

Inside the widget there is the StatsAI name and a button to the full analysis. A separate text link below the widget is off by default; you can turn it on in Settings > StatsAI Widget.

== Screenshots ==

1. The club widget before the match: AI chances for 1, X and 2, goals, top pick and form (dark look).
2. The same widget in the light look.
3. The block in the editor: search for a club and the widget appears right away.

== Changelog ==

= 1.0.0 =
* First release: block, classic widget and shortcode; dark and light look; English, Serbian and Hungarian.

== Upgrade Notice ==

= 1.0.0 =
First release.
