=== Live Sea Temperature Widget by SeaTempMap ===
Contributors: fen0m
Tags: sea temperature, water temperature, beach, weather, uv index
Requires at least: 6.3
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.1.6
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Show the live sea temperature, weather and UV index for any beach. The official WordPress add-on for the SeaTempMap.com sea temperature map.

== Description ==

**SeaTempMap is a website: a live sea temperature map of the world's coasts.** It shows today's water temperature anywhere in the ocean, a 10-day sea forecast, the UV index and long-term monthly averages – free, in 30 languages, at [seatempmap.com](https://seatempmap.com) and in its Android and iOS apps.

**This plugin is the official WordPress add-on to that map.** It brings one piece of it – a live sea temperature card for a beach you choose – onto your own pages, with a block or a shortcode.

Guests want to know one thing before they book a beach holiday: how warm is the water. This plugin puts that number on your site, updated through the day.

The card shows the current sea temperature at the beach you choose, plus air temperature, weather and the UV index. Sea temperatures come from NASA satellite data, sampled at the swimming area rather than out at sea.

**Any beach, and 174 of them already in the picker.** The block and the shortcode choose from a curated list of 174 beaches and coastal cities, and that list keeps growing – new ones appear in the picker on their own, with no plugin update needed. If yours is missing, email **hello@seatempmap.com** with the name and we will look at adding it. For a coast that is not on the list, build the same card for any point on Earth at [seatempmap.com/embed](https://seatempmap.com/embed) and paste the code it gives you into a Custom HTML block – it is free too, and the card is identical.

**How it looks**

The card renders in an isolated shadow root, so your theme's CSS cannot break it and its styling cannot leak into your page. It reads your page's background and picks a light or dark card to match, or you can force either one.

**Features**

* 174 beaches and coastal cities in the picker – and any other coast in the world with the code from [seatempmap.com/embed](https://seatempmap.com/embed)
* Celsius or Fahrenheit
* Light, dark, or automatic to match the visitor's system
* Speaks 30 languages, following your page's `lang` attribute by default
* Full card (sea, air, weather, UV) or a compact sea-only card
* Drop shadow on or off, so the card suits a flat design as well as a layered one
* Block editor block, and a `[seatempmap]` shortcode for classic themes and page builders
* Updates itself while the page is open. Nothing to maintain
* No account, no API key, no cost

**Shortcode**

`[seatempmap dest="hvar"]`

Attributes: `dest` (required, the beach id), `units` (`c` or `f`), `theme` (`auto`, `light`, `dark`), `show` (`both` or `sea`), `shadow` (`on` or `off`), `lang` (a language code, or leave empty to follow your page).

Preview every option and find beach ids at [seatempmap.com/embed](https://seatempmap.com/embed).

== External services ==

This plugin relies on seatempmap.com, a third-party service, to provide the temperature data and to draw the card.

The plugin itself only outputs a placeholder element. The card is drawn by `widget/v1.js`, which is the service's own renderer rather than a copy of a general-purpose library hosted on a CDN. It is loaded from the service because it must stay in step with the data format the service returns; bundling a copy would break every site the moment the format changed.

**What is sent and when**

1. On a page containing the widget, the visitor's browser loads the card script from `https://seatempmap.com/widget/v1.js` and then requests `https://seatempmap.com/api/widget` with the beach id, unit and language you configured. As with any request to a third-party server, the visitor's IP address and user agent are visible to it. No cookies are set, no identifiers are stored, and nothing about the visitor or your site's content is sent.
2. In the admin, your server requests `https://seatempmap.com/api/widget/destinations` to list the available beaches. This is cached for a day and sends nothing about your site.
3. In the block editor, your own browser loads the same card script and requests the same `https://seatempmap.com/api/widget` endpoint, so the block shows you the real card rather than a mock-up of it. This happens only while you are editing a post that contains the block, and nothing about your site or the post is sent.

Service provided by Sea Temp Map: [terms of service](https://seatempmap.com/legal/terms), [privacy policy](https://seatempmap.com/legal/privacy).

== Installation ==

1. Install and activate the plugin.
2. Edit a page or post and add the **Live Sea Temperature** block, or place the `[seatempmap dest="..."]` shortcode.
3. Pick your beach. That is all.

== Frequently Asked Questions ==

= Is SeaTempMap a plugin or a website? =

SeaTempMap is a website: a live sea temperature map covering every coast on Earth, at seatempmap.com, with apps for Android and iOS. This plugin is one of the ways to use it – it places a live card from that map on your own WordPress site. The map, its destination pages and the apps exist on their own, with or without WordPress.

= My beach is not in the list. =

The list covers 174 beaches and coastal cities. If yours is missing, write to hello@seatempmap.com and say which one.

= Does it slow my site down? =

The script loads asynchronously and only on pages that actually contain a widget. It has no dependencies and does not load jQuery, fonts or a framework.

= Will it match my theme? =

By default it reads the background behind it and picks a light or dark card to fit. You can force light or dark instead.

= Can I use it more than once on a page? =

Yes. Each card is independent, and the script is loaded once regardless of how many you place.

= Does it work with page builders and classic themes? =

Yes, through the shortcode. Any builder with a shortcode or raw HTML element can host it.

= Where does the data come from? =

Sea temperature comes from NASA satellite measurements; weather and UV come from forecast models. The reading is taken at the swimming area near each beach rather than in open water, which is usually a degree or two different.

= Does the widget link to your site? =

Yes, and only from inside the card itself. The card shows "SeaTempMap.com" and links to the beach page it is showing, the same way an embedded map or video links back to its source. That link is the attribution for the data.

Nothing is added anywhere else on your site. There is no footer credit, no "powered by" line, and no link outside the widget you placed. Remove the widget and every trace of it is gone.

For the curious: the markup contains that link as a plain `<a>` before the card renders over it. It is the fallback a visitor sees if JavaScript is off or the service is unreachable, so the card never collapses into an empty box.

= Does it collect anything about my visitors? =

No. There are no cookies, no tracking pixel and no analytics. The card requests a temperature and draws it.

== Screenshots ==

1. The card reads your page's background and matches it, light or dark.
2. The block editor shows the real card, live, with every setting beside it.
3. Sea, air and UV in one card – this one is in our own footer on seatempmap.com.

== Changelog ==

= 1.1.6 =
* Renamed to "Live Sea Temperature Widget by SeaTempMap" so the title reads as the widget it is, published by SeaTempMap. The plugin's slug, settings, shortcode and markup are untouched, and no site needs any change.
* The listing now says plainly what SeaTempMap is – a live sea temperature map at seatempmap.com, with apps for Android and iOS – and that this plugin is the WordPress add-on to it. Search engines and AI answers were reading the plugin as if it were the whole thing. Text only – the plugin itself is unchanged.

= 1.1.5 =
* The listing now says what the plugin actually covers: any beach in the world, with 174 beaches and coastal cities ready to pick in the block. For a coast that is not on that list, the card can be built for any coordinates at seatempmap.com/embed. Text only – the plugin itself is unchanged.

= 1.1.4 =
* The credit under the card now reads simply "SeaTempMap.com". It used to say "Sea temperature in {beach} · SeaTempMap.com", which was written when the link sat hidden in the markup; the card now shows that text to your visitors, and a short credit reads better under it. The link still points at the same beach page, and nothing else about the card changes.

= 1.1.3 =
* The block now shows the real, live card in the editor – the same one your visitors get, with the current temperature in it – instead of a stand-in. Change a setting and it repaints as you watch. If the card script cannot be reached, the stand-in still appears. Editor only; published pages are unchanged.

= 1.1.2 =
* The block now stands in for the card at the size it will render, instead of drawing a large empty box once a beach was chosen. Editor only; published pages are unchanged.

= 1.1.1 =
* Fixed: the block did not appear in the inserter. Its editor script was registered without its WordPress dependencies, so it ran before the editor was ready and stopped. The shortcode was unaffected.

= 1.1.0 =
* New `shadow` option (block setting and shortcode attribute) turns the card's drop shadow off for flat page designs. The glass surface and its edge are unchanged.
* Cards placed before this release are unaffected: without the attribute the markup is identical to 1.0.0.

= 1.0.0 =
* First release.
