96 lines
3.7 KiB
Text
96 lines
3.7 KiB
Text
=== Font del Bosc — El Temps ===
|
|
Contributors: robotstxt
|
|
Tags: weather, forecast, meteocat, aemet, open-meteo
|
|
Requires at least: 6.4
|
|
Tested up to: 7.1
|
|
Stable tag: 1.0.0
|
|
Requires PHP: 8.2
|
|
Version: 1.0.0
|
|
License: GPL-3.0-or-later
|
|
License URI: https://www.gnu.org/licenses/gpl-3.0.txt
|
|
|
|
Weather for Font del Bosc (Mediona, Alt Penedès): current conditions, hourly and daily forecast, and historical data.
|
|
|
|
== Description ==
|
|
|
|
Displays the weather for the Font del Bosc urbanization (Mediona, Sant Joan de Mediona, Alt Penedès, Barcelona). The location is fixed to the Font del Bosc spring coordinates; there is no location picker.
|
|
|
|
Data sources, with automatic fallback:
|
|
|
|
* Meteocat (Servei Meteorològic de Catalunya): hourly municipal forecast and XEMA station observations. Requires a free API key.
|
|
* AEMET OpenData: daily municipal forecast. Requires a free API key.
|
|
* Open-Meteo: current conditions, forecast and historical data (ERA5). No API key required; used automatically when no other key is configured.
|
|
|
|
All requests are cached through the WordPress Transients API, with a stale-while-error policy so cached data is served when a source temporarily fails.
|
|
|
|
Icons by Meteocons (MIT license), bundled with the plugin.
|
|
|
|
== Using the plugin ==
|
|
|
|
= Shortcode =
|
|
|
|
`[fontdelbosc_eltemps]` renders the current conditions. Attributes:
|
|
|
|
* `view`: `current` (default), `hourly`, `daily` or `historical`.
|
|
* `hours`: hours to show in the hourly view (1-48, default 24).
|
|
* `days`: days to show in the daily view (1-7, default 7).
|
|
* `year` / `month`: month shown in the historical view (defaults to the last completed month).
|
|
|
|
Examples:
|
|
|
|
`[fontdelbosc_eltemps view="hourly" hours="24"]`
|
|
`[fontdelbosc_eltemps view="daily" days="5"]`
|
|
`[fontdelbosc_eltemps view="historical" year="2024" month="6"]`
|
|
|
|
= Widget =
|
|
|
|
A sidebar widget with an editable title offers the current conditions or today's forecast.
|
|
|
|
= Settings =
|
|
|
|
Settings → Font del Bosc Temps: AEMET and Meteocat API keys, cache TTLs, attribution toggle, data deletion on uninstall, and connection tests. When a Meteocat key is set, the nearest XEMA station to Font del Bosc can be detected automatically.
|
|
|
|
== Installation ==
|
|
|
|
= Automatic download =
|
|
|
|
Visit the plugin section in your WordPress, search for "Font del Bosc — El Temps"; download and install the plugin.
|
|
|
|
= Manual download =
|
|
|
|
Extract the contents of the ZIP and upload the contents to the `/wp-content/plugins/fontdelbosc-eltemps/` directory. Once uploaded, it will appear in your plugin list.
|
|
|
|
== Frequently Asked Questions ==
|
|
|
|
= Do I need API keys? =
|
|
|
|
No. Without keys the plugin uses Open-Meteo for everything. Adding an AEMET key improves the daily forecast, and adding a Meteocat key improves the hourly forecast and enables station observations.
|
|
|
|
= Where do the historical data come from? =
|
|
|
|
The Open-Meteo ERA5 archive (from 1940), which is available without a key.
|
|
|
|
== Compatibility ==
|
|
|
|
* WordPress: 6.4 - 7.1
|
|
* PHP: 8.2 - 8.5
|
|
|
|
== Changelog ==
|
|
|
|
= 1.0.0 =
|
|
|
|
* Initial release: current conditions, hourly forecast, daily forecast, historical month view, widget, shortcode, caching and source fallback.
|
|
|
|
= Previous versions =
|
|
|
|
If you want to see the full changelog, visit the [changelog.txt](https://github.com/robotstxt/fontdelbosc-eltemps/raw/main/changelog.txt) file.
|
|
|
|
== Compliance ==
|
|
|
|
This plugin adheres to the following security measures and review protocols for each version:
|
|
|
|
* [WordPress Plugin Handbook](https://developer.wordpress.org/plugins/)
|
|
* [WordPress Plugin Security](https://developer.wordpress.org/plugins/wordpress-org/plugin-security/)
|
|
* [WordPress APIs Security](https://developer.wordpress.org/apis/security/)
|
|
* [WordPress Coding Standards](https://github.com/WordPress/WordPress-Coding-Standards)
|
|
* [Plugin Check (PCP)](https://wordpress.org/plugins/plugin-check/)
|