=== BeachFinder Widget ===
Contributors: beachfinder
Tags: beach, beaches, weather, travel, widget
Requires at least: 5.8
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Embed the public BeachFinder beach conditions widget in WordPress with a shortcode.

== Description ==

BeachFinder Widget adds the `[beachfinder_widget]` shortcode. It renders an iframe pointing to the public BeachFinder widget at `https://getbeachfinder.com/widget/beach-conditions`.

The shortcode accepts optional parameters for location, display text, language, search radius, result limit, and theme.

== Installation ==

1. Upload the `wordpress-beachfinder-widget` folder to `/wp-content/plugins/`.
2. In WordPress admin, open Plugins and activate "BeachFinder Widget".
3. Add a Shortcode block to a page or post.
4. Insert `[beachfinder_widget]` or a configured shortcode.

== Usage ==

Default widget:

`[beachfinder_widget]`

Configured widget:

`[beachfinder_widget lat="45.526" lng="4.919" title="Conditions de baignade autour de Vienne" lang="fr" radius="50" limit="8" theme="light" height="720"]`

Supported parameters:

* `lat` - Latitude for the initial location.
* `lng` - Longitude for the initial location.
* `title` - Widget title and iframe title.
* `lang` - Interface language, for example `fr` or `en`.
* `radius` - Search radius in kilometers.
* `limit` - Maximum number of results to display.
* `theme` - Widget theme, either `light` or `dark`.
* `height` - Iframe minimum height in pixels. Values are clamped between 420 and 1200.

Empty parameters are ignored. Non-empty parameters are passed to the BeachFinder widget URL as query string values.

== Frequently Asked Questions ==

= Does this plugin require a BeachFinder API key? =

No. The plugin only embeds the public BeachFinder widget.

= Can I use it in a theme template? =

Yes. Use WordPress' `do_shortcode()` function:

`<?php echo do_shortcode('[beachfinder_widget lat="45.526" lng="4.919" lang="fr"]'); ?>`

== Changelog ==

= 1.0.0 =

* Initial shortcode plugin for the BeachFinder public widget.
