=== BeBasket ===
Contributors: neobasket, bebasket
Tags: basketball, widget, embed, oembed, stats
Requires at least: 5.2
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Embed BeBasket widgets in your WordPress posts by pasting a URL.

== Description ==

BeBasket is a reference platform for basketball news and live statistics. This plugin lets you embed our widgets directly in your WordPress posts and pages.

Simply paste a BeBasket widget URL in your editor and WordPress will automatically display the widget. No shortcodes, no configuration.

**Supported widgets**

* Player profile — photo, position, height, nationality, and optional live stats by season and league.
* Article — embed a BeBasket article with image, title, author and date.
* Game — a game result or a player's stat line (points, rebounds, assists).
* League round — results of a given round of a league.
* Team next games — the next N games of a team.
* Player next games — the next N games of a player.
* Player last games — the last N games of a player with their stat lines.
* Player comparison — side-by-side comparison of two players.
* News — a feed of the latest BeBasket articles.

Create your widget for free at [bebasket.fr/widget](https://www.bebasket.fr/widget).

**Supported domains**

* `www.bebasket.fr/widget/*`
* `www.bebasket.be/widget/*`
* `www.be-basketball.com/widget/*`

== Installation ==

1. Install the plugin from the WordPress plugin directory, or upload the `bebasket` folder to `/wp-content/plugins/`.
2. Activate the plugin from the Plugins menu.
3. Paste a BeBasket widget URL (for example `https://www.bebasket.fr/widget/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`) in any post or page. WordPress handles the rest.

== Frequently Asked Questions ==

= Do I need an account on BeBasket to embed a widget? =

No. Widgets are free to create and embed, anonymously or signed in.

= Where do I generate a widget? =

At [bebasket.fr/widget](https://www.bebasket.fr/widget), or the equivalent page on be-basketball.com / bebasket.be. Pick a type, configure it, copy the URL, paste it in WordPress.

= Can I customize the widget's appearance? =

Yes. Each widget picks up an accent color you choose at creation time. No additional styling is required — widgets adapt to common WordPress themes.

= Does the widget impact site performance? =

The widget script is lazy-loaded from our CDN with aggressive caching. Expected footprint per page: one HTTP request for the script (around 6 KB gzipped) plus one JSON fetch per widget instance.

= Does this plugin store any personal data? =

No. The plugin does not collect, store, or transmit any personal data. Widgets themselves only load public basketball content.

== External services ==

This plugin relies on the BeBasket API to provide oEmbed support.

When a BeBasket widget URL is pasted into the WordPress editor, WordPress
automatically calls the BeBasket oEmbed endpoint to retrieve the HTML needed
to display the widget. The widget URL is sent to our API at that point.
No personal data is transmitted.

Service: BeBasket API — https://admin.bebasket.fr/api/v1
Legal notice: https://www.bebasket.fr/mentions-legales
Privacy policy: https://www.bebasket.fr/donnees-personnelles

== Changelog ==

= 1.0.1 =
* Fix: whitelist the `bb-news-widget` custom element so the News widget renders correctly when pasted into a post.
* Docs: list the three additional widget types already supported (player last games, player comparison, news).

= 1.0.0 =
* Initial release.
* oEmbed support for nine widget types: player profile, article, game, league round, team next games, player next games, player last games, player comparison, news.
* Works with bebasket.fr, bebasket.be and be-basketball.com.
