

The settings screen after activation — widget preview and the activation status
WFY24 Weather Widget puts a weather card from wfy24.com on any post, page or sidebar: with the WFY24 Weather Widget block, the [wfy24_weather] shortcode, or the one-click quick actions on the settings screen.
There is no API key to sign up for and nothing to copy and paste. The activation button registers your site with wfy24.com and stores the widget key for you.
The forecast is wfy24.com’s and is based on numerical weather models: DWD ICON (ICON-D2 over central Europe, ICON-EU over Europe, ICON global elsewhere), ECMWF and NOAA GFS. The Classic, Forecast, Week and Country map layouts name the models in their footer. The Country map’s region boundaries come from OpenStreetMap data, credited on the map.
Shortcode, with the defaults from Settings WFY24 Weather:
[wfy24_weather]
Override them for one widget:
[wfy24_weather city="paris-fr17807753" theme="dark" variant="forecast" lang="fr"]
[wfy24_weather variant="country" country="GR"] shows the Country map of Greece.
Attributes: city (a wfy24.com city slug), variant (classic, compact, minimal, badge, forecast, aqi, aqi-wide, country, week), country (the Country map’s two-letter country code, e.g. GR; without it, the country of the city, else the visitor’s — the settings screen and the block list the countries by name), theme (auto, light, dark), units (metric, imperial), lang (any of the 52 codes, optionally with a region such as pt-BR), width (400, 400px, 80%) and geolocation (on asks the visitor’s browser for the precise location).
Or add the WFY24 Weather Widget block (Widgets category). Its settings start on «Site default» and follow Settings WFY24 Weather until you change them; the editor shows the chosen layout with sample weather.
Every widget shows one small credit link, «wfy24.com». It opens the wfy24.com forecast page of the place the widget shows, in a new tab; the place name in the widget links to the same page. On the Country map the credit opens the country’s page, the title and each town link to their pages on wfy24.com, and the map credit «© OpenStreetMap» links to OpenStreetMap’s copyright page. The activation screen mentions the credit link above the «Activate now (free)» button.
This plugin works with the WFY24 weather service at https://www.wfy24.com. Requests from your server carry a User-Agent with the plugin’s name and version and your site’s address.
/api/widget/register-from-plugin with the email address you confirmed in the form, your site’s domain and name, the WordPress and plugin versions and the site language. wfy24.com answers with the widget key, which the plugin stores. If wfy24.com already has a widget for that email and domain, it answers with the first characters of that key and a link to request a replacement, and the plugin shows the «Connect an existing WFY24 widget» form. Pasting a key into that form sends nothing./api/places/search (through the plugin’s admin-only route /wp-json/wfy24/v1/cities, so your browser never calls wfy24.com directly). Answers are cached for 5 minutes./api/places/by-slug/{slug} (and, if that fails, /api/places/search with the city’s name) for the place’s names. Only the city slug or name is sent. The answers are stored in your database (option wfy24_places) and pages are rendered from them; a visitor’s page view never waits for wfy24.com. The default city is looked up while the structured data is off too, so that the settings screen can say when wfy24.com does not know its slug. Nothing is looked up before the site is activated, and after a lookup that could not reach wfy24.com none is tried for an hour.https://www.wfy24.com/widget.js and requests the weather from /api/widget/data with the widget key, the city, the language and the units (the Week layout asks for seven days). Without a city, wfy24.com locates the visitor approximately from the IP address of the request (/api/widget/ip-location, or the data request itself). The air quality layouts also call /api/air-quality/current. The Country map requests /api/widget/country instead, with the widget key, the country (or, without one, the city) and the language; with neither, wfy24.com finds the visitor’s country from the IP address of the request, and the layout never asks the browser for a position. With «Auto-detect visitor location» on, the browser asks the visitor first and, if they agree, sends their latitude and longitude. The widget refreshes every 10 minutes while the page is visible.https://www.wfy24.com/widget.js into a sandboxed frame, which draws the chosen layout with built-in sample weather. The frame sends no widget key and no Referer, and makes no weather request. The admin page (the settings screen or the editor) tells the frame which width to draw and the frame answers with the widget’s size; neither leaves your browser. Before activation the block shows a note instead and loads nothing from wfy24.com. A WFY24 Weather Widget block in a widget area (Appearance Widgets, the Customizer) previews the same way; the «Add to sidebar» text widget shows a note in its preview and loads nothing from wfy24.com.wfy24.com is served through Cloudflare. Like any web server it keeps access logs of these requests — the visitor’s IP address, the address of the page that shows the widget (Referer), the browser’s User-Agent and the request with the widget key shortened — currently for about 52 days, for security, rate limiting and abuse prevention. The plugin runs no scheduled tasks and sends no telemetry.
The plugin works on Multisite. All settings (key, defaults, the created page) are stored per subsite, so each subsite runs independently.
site-a.example.com does not work on site-b.example.com, so subdomain and domain-mapped networks get one key per subsite.example.com/site-a, example.com/site-b … every subsite reports the same domain, example.com. Activate the main site normally; on each further subsite open Connect an existing WFY24 widget and paste the main site’s key (the main site shows it under Settings WFY24 Weather Advanced). A second «Activate» with the same email on the same host is answered with «already registered» and the connect form, not a second key.