{"id":253965,"date":"2025-10-02T18:57:30","date_gmt":"2025-10-02T18:57:30","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/sv-vader\/"},"modified":"2026-03-17T07:48:42","modified_gmt":"2026-03-17T07:48:42","slug":"spelhubben-weather","status":"publish","type":"plugin","link":"https:\/\/mlt.wordpress.org\/plugins\/spelhubben-weather\/","author":23373151,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"2.0.3","stable_tag":"2.0.3","tested":"6.9.4","requires":"6.9.4","requires_php":"7.4","requires_plugins":null,"header_name":"Spelhubben Weather","header_author":"Spelhubben","header_description":"Displays current weather and an optional forecast with a simple consensus across providers (Open-Meteo, SMHI, Yr\/MET Norway). Supports shortcode + Gutenberg block + classic widget. Optional Leaflet map, subtle animations, daily forecast, and multiple layouts.","assets_banners_color":"e1edf8","last_updated":"2026-03-17 07:48:42","external_support_url":"","external_repository_url":"","donate_link":"https:\/\/www.paypal.com\/donate\/?hosted_button_id=CV74CEXY5XEAU","header_plugin_uri":"","header_author_uri":"","rating":0,"author_block_rating":0,"active_installs":10,"downloads":1368,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.6.1":{"tag":"1.6.1","author":"spelhubben","date":"2025-10-03 16:34:43"},"1.7.0":{"tag":"1.7.0","author":"spelhubben","date":"2025-10-04 08:29:22"},"1.8.2":{"tag":"1.8.2","author":"spelhubben","date":"2025-12-15 18:00:48"},"1.8.3":{"tag":"1.8.3","author":"spelhubben","date":"2025-12-17 18:12:09"},"1.8.4":{"tag":"1.8.4","author":"spelhubben","date":"2025-12-22 11:18:54"},"1.8.5":{"tag":"1.8.5","author":"spelhubben","date":"2026-01-02 13:29:07"},"1.8.6":{"tag":"1.8.6","author":"spelhubben","date":"2026-01-03 16:15:45"},"1.9.0":{"tag":"1.9.0","author":"spelhubben","date":"2026-01-08 14:59:19"},"1.9.1":{"tag":"1.9.1","author":"spelhubben","date":"2026-01-09 09:10:33"},"1.9.2":{"tag":"1.9.2","author":"spelhubben","date":"2026-01-09 11:32:18"},"1.9.3":{"tag":"1.9.3","author":"spelhubben","date":"2026-01-12 16:05:21"},"1.9.4":{"tag":"1.9.4","author":"spelhubben","date":"2026-01-13 16:39:30"},"1.9.5":{"tag":"1.9.5","author":"spelhubben","date":"2026-01-16 07:04:49"},"1.9.7":{"tag":"1.9.7","author":"spelhubben","date":"2026-01-30 21:06:01"},"1.9.8":{"tag":"1.9.8","author":"spelhubben","date":"2026-02-02 18:17:32"},"1.9.9":{"tag":"1.9.9","author":"spelhubben","date":"2026-03-04 14:15:39"},"2.0.0":{"tag":"2.0.0","author":"spelhubben","date":"2026-03-08 14:40:15"},"2.0.1":{"tag":"2.0.1","author":"spelhubben","date":"2026-03-11 18:37:51"},"2.0.2":{"tag":"2.0.2","author":"spelhubben","date":"2026-03-11 19:29:31"},"2.0.3":{"tag":"2.0.3","author":"spelhubben","date":"2026-03-17 07:48:42"}},"upgrade_notice":{"1.9.5":"<p>Added moon phase support (phase + illumination) in renderer, shortcodes, block and widget.<\/p>","1.8.5":"<p>Performance optimization release with conditional asset loading. Fixes 404 errors and MIME type warnings for Leaflet on non-weather pages. Recommended for all users.<\/p>","1.8.4":"<p>Maintenance release with centralized configuration constants and performance optimizations. Recommended for all users.<\/p>","1.8.0":"<p><strong>BREAKING CHANGE:<\/strong> Legacy <code>[sv_vader \u2026]<\/code> shortcode has been removed. Please migrate all shortcodes to use <code>[spelhubben_weather \u2026]<\/code> format. Performance update with security fixes, geocoding caching, and new plugin showcase feature. Strongly recommended.<\/p>","1.7.5":"<p>Adds <strong>FMI<\/strong> as an optional free provider. Enable it under <strong>Settings \u2192 Spelhubben Weather \u2192 Providers<\/strong>, or pass <code>providers=&amp;quot;smhi,yr,openmeteo,fmi&amp;quot;<\/code> in blocks\/shortcodes\/widgets.<\/p>","1.7.0":"<p>Admin UX overhaul: new Shortcodes page with live preview, units\/format settings, and cache clear. Legacy [sv_vader] is deprecated\u2014please migrate to [spelhubben_weather].<\/p>\n\n<p>Donate link: https:\/\/www.paypal.com\/donate\/?hosted_button_id=CV74CEXY5XEAU<\/p>"},"ratings":[],"assets_icons":{"icon-128x128.png":{"filename":"icon-128x128.png","revision":3425317,"resolution":"128x128","location":"assets","locale":""},"icon-256x256.png":{"filename":"icon-256x256.png","revision":3425317,"resolution":"256x256","location":"assets","locale":""}},"assets_banners":{"banner-1544x500.png":{"filename":"banner-1544x500.png","revision":3425317,"resolution":"1544x500","location":"assets","locale":""},"banner-772x250.png":{"filename":"banner-772x250.png","revision":3425317,"resolution":"772x250","location":"assets","locale":""}},"assets_blueprints":{},"all_blocks":{"spelhubben-weather\/spelhubben-weather":{"apiVersion":2,"name":"spelhubben-weather\/spelhubben-weather","title":"Spelhubben Weather","category":"widgets","icon":"cloud","description":"Current weather and optional daily forecast with map, subtle animations, and multiple layouts.","keywords":["weather","forecast","map"],"textdomain":"spelhubben-weather","supports":{"html":false},"attributes":{"ort":{"type":"string","default":"Stockholm"},"place":{"type":"string","default":""},"lat":{"type":"string","default":""},"lon":{"type":"string","default":""},"show":{"type":"string","default":"temp,wind,wind_dir,icon"},"layout":{"type":"string","default":"card"},"map":{"type":"boolean","default":false},"mapHeight":{"type":"number","default":240},"animate":{"type":"boolean","default":true},"forecast":{"type":"string","default":"none"},"days":{"type":"number","default":5},"showAlerts":{"type":"boolean","default":true},"units":{"type":"string","default":"metric"},"date_format":{"type":"string","default":"D j\/n"},"wind_unit":{"type":"string","default":""}},"editorScript":"file:.\/index.js","style":"sv-vader-style"}},"tagged_versions":["1.6.1","1.7.0","1.8.2","1.8.3","1.8.4","1.8.5","1.8.6","1.9.0","1.9.1","1.9.2","1.9.3","1.9.4","1.9.5","1.9.7","1.9.8","1.9.9","2.0.0","2.0.1","2.0.2","2.0.3"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3425317,"resolution":"1","location":"assets","locale":""},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3435228,"resolution":"2","location":"assets","locale":""},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3435228,"resolution":"3","location":"assets","locale":""},"screenshot-4.png":{"filename":"screenshot-4.png","revision":3435228,"resolution":"4","location":"assets","locale":""},"screenshot-5.png":{"filename":"screenshot-5.png","revision":3435228,"resolution":"5","location":"assets","locale":""},"screenshot-6.png":{"filename":"screenshot-6.png","revision":3435228,"resolution":"6","location":"assets","locale":""}},"screenshots":{"1":"Frontend examples: inline, compact, card, detailed, with optional map.","2":"Frontend example: New look and wind direction","3":"Settings page: defaults, providers, cache, units &amp; format.","4":"Alerts page: active warnings and smart recommendations for extreme conditions.","5":"Shortcodes page: searchable examples, copy buttons, and admin live preview.","6":"Performance page: cache statistics, API usage and \"Clear cache\" action."},"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[4121,4900,80,4899,162],"plugin_category":[43,59],"plugin_contributors":[248685],"plugin_business_model":[],"class_list":["post-253965","plugin","type-plugin","status-publish","hentry","plugin_tags-blocks","plugin_tags-forecast","plugin_tags-shortcode","plugin_tags-weather","plugin_tags-widget","plugin_category-customization","plugin_category-utilities-and-tools","plugin_contributors-spelhubben","plugin_committers-spelhubben"],"banners":{"banner":"https:\/\/ps.w.org\/spelhubben-weather\/assets\/banner-772x250.png?rev=3425317","banner_2x":"https:\/\/ps.w.org\/spelhubben-weather\/assets\/banner-1544x500.png?rev=3425317","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":false,"icon":"https:\/\/ps.w.org\/spelhubben-weather\/assets\/icon-128x128.png?rev=3425317","icon_2x":"https:\/\/ps.w.org\/spelhubben-weather\/assets\/icon-256x256.png?rev=3425317","generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/spelhubben-weather\/assets\/screenshot-1.png?rev=3425317","caption":"Frontend examples: inline, compact, card, detailed, with optional map."},{"src":"https:\/\/ps.w.org\/spelhubben-weather\/assets\/screenshot-2.png?rev=3435228","caption":"Frontend example: New look and wind direction"},{"src":"https:\/\/ps.w.org\/spelhubben-weather\/assets\/screenshot-3.png?rev=3435228","caption":"Settings page: defaults, providers, cache, units &amp; format."},{"src":"https:\/\/ps.w.org\/spelhubben-weather\/assets\/screenshot-4.png?rev=3435228","caption":"Alerts page: active warnings and smart recommendations for extreme conditions."},{"src":"https:\/\/ps.w.org\/spelhubben-weather\/assets\/screenshot-5.png?rev=3435228","caption":"Shortcodes page: searchable examples, copy buttons, and admin live preview."},{"src":"https:\/\/ps.w.org\/spelhubben-weather\/assets\/screenshot-6.png?rev=3435228","caption":"Performance page: cache statistics, API usage and \"Clear cache\" action."}],"raw_content":"<!--section=description-->\n<p>This plugin displays current weather and an optional forecast. It can aggregate data from free global weather providers (Open-Meteo, SMHI, Yr\/MET Norway, FMI, Open-Weathermap, and Weatherapi.com) and compute a simple consensus. Works worldwide with excellent coverage in Europe and beyond.<\/p>\n\n<h3>License<\/h3>\n\n<p>This program is free software; you can redistribute it and\/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.<\/p>\n\n<p>Full license text is included in the <code>LICENSE<\/code> file in the plugin root.<\/p>\n\n<h3>Feedback &amp; Bug Reports<\/h3>\n\n<p>Feedback and bug reports can be posted here: https:\/\/github.com\/K3NT4\/spelhubben-weather\/issues\nFor common questions see the FAQ: https:\/\/github.com\/K3NT4\/spelhubben-weather\/blob\/main\/Docs\/FAQ.md\nFor Roadmap: https:\/\/github.com\/users\/K3NT4\/projects\/2\nLicense: GPLv3 or later\nLicense URI: https:\/\/www.gnu.org\/licenses\/gpl-3.0.html<\/p>\n\n<p>Weather widget &amp; block with optional map and daily forecast. Can combine Open-Meteo, SMHI, Yr\/MET, FMI, Open-Weathermap, and Weatherapi.com data.<\/p>\n\n<h3>Translations<\/h3>\n\n<p>The plugin is <strong>fully translatable<\/strong> and includes built-in translations for <strong>Swedish (sv_SE)<\/strong> and <strong>Norwegian Bokm\u00e5l (nb_NO)<\/strong>.<\/p>\n\n<h3>How to translate the plugin<\/h3>\n\n<p><strong>Option 1: Contribute to translate.wordpress.org (recommended)<\/strong>\n- Visit <a href=\"https:\/\/translate.wordpress.org\/projects\/wp-plugins\/spelhubben-weather\/\">translate.wordpress.org<\/a>\n- Select your language and add translations via the browser interface\n- Your translations will automatically be included in future releases<\/p>\n\n<p><strong>Option 2: Local translation files<\/strong>\nIf you need to add or modify translations locally:<\/p>\n\n<ol>\n<li><p><strong>Generate or update the POT file<\/strong> (translation template):\n   <code>wp i18n make-pot . languages\/spelhubben-weather.pot --slug=spelhubben-weather<\/code><\/p><\/li>\n<li><p><strong>Create a PO file for your language<\/strong> (e.g., <code>spelhubben-weather-de_DE.po<\/code>):<\/p>\n\n<ul>\n<li>Copy the <code>.pot<\/code> file and rename to match your locale (e.g., <code>de_DE<\/code>)<\/li>\n<li>Use a translation tool like <a href=\"https:\/\/poedit.net\/\">Poedit<\/a> or a text editor<\/li>\n<li>Translate all strings in the PO file<\/li>\n<li>Save the file as <code>spelhubben-weather-de_DE.po<\/code><\/li>\n<\/ul><\/li>\n<li><p><strong>Generate the MO file<\/strong> (compiled binary format):\n   <code>msgfmt spelhubben-weather-de_DE.po -o spelhubben-weather-de_DE.mo<\/code><\/p><\/li>\n<li><p><strong>Place files in the plugin<\/strong>:<\/p>\n\n<ul>\n<li>Store both <code>.po<\/code> and <code>.mo<\/code> files in <code>\/languages\/<\/code><\/li>\n<li>Also generate a <code>.l10n.php<\/code> file (WordPress 6.0+):\n <code>wp i18n make-json languages\/spelhubben-weather-de_DE.po --no-purge<\/code><\/li>\n<\/ul><\/li>\n<li><p><strong>Activate your translation<\/strong>:<\/p>\n\n<ul>\n<li>Change your WordPress language to match the locale code (Settings \u2192 General \u2192 Site Language)<\/li>\n<li>The plugin will automatically load the translated strings<\/li>\n<\/ul><\/li>\n<\/ol>\n\n<p><strong>Translation file structure<\/strong>:\n    <code>languages\/\n  spelhubben-weather.pot          (template for all translations)\n  spelhubben-weather-sv_SE.po    (Swedish source text)\n  spelhubben-weather-sv_SE.mo    (Swedish compiled)\n  spelhubben-weather-sv_SE.l10n.php\n  spelhubben-weather-nb_NO.po    (Norwegian source text)\n  spelhubben-weather-nb_NO.mo    (Norwegian compiled)\n  spelhubben-weather-nb_NO.l10n.php<\/code><\/p>\n\n<p><strong>What gets translated<\/strong>:\n- All frontend strings (shortcode output, widget labels, weather descriptions, WMO codes)\n- Admin settings and UI labels\n- JavaScript strings (expand\/collapse, status messages)\n- Error messages and notices<\/p>\n\n<p><strong>Best practices<\/strong>:\n- Use context clues in the POT file (<code>msgctxt<\/code>) to distinguish similar phrases\n- Test your translation in WordPress to ensure formatting and plurals work correctly\n- Check that translated UI aligns properly in your language (RTL vs LTR)<\/p>\n\n<!--section=installation-->\n<ol>\n<li>Upload\/activate the plugin.<\/li>\n<li>Go to <strong>Settings \u2192 Spelhubben Weather<\/strong> and set defaults (place, shown fields, layout, providers, cache time, units\/format).<\/li>\n<li>Add weather to your site in any of these ways:<\/li>\n<\/ol>\n\n<h4>Block (Gutenberg)<\/h4>\n\n<ul>\n<li>Edit a page\/post \u2192 click <strong>Add block<\/strong> \u2192 search for <strong>\u201cSpelhubben Weather\u201d<\/strong>.<\/li>\n<li>Optional: override defaults in the block sidebar (place\/lat,lon, layout, map, forecast).<\/li>\n<\/ul>\n\n<h4>Shortcode<\/h4>\n\n<ul>\n<li>Insert <code>[spelhubben_weather]<\/code> anywhere shortcodes are supported.<\/li>\n<li>Examples:\n\n<ul>\n<li>Basic: <code>[spelhubben_weather]<\/code><\/li>\n<li>Compact with map &amp; animation: <code>[spelhubben_weather place=\"Gothenburg\" layout=\"compact\" map=\"1\" animate=\"1\"]<\/code><\/li>\n<li>Inline no map: <code>[spelhubben_weather lat=\"57.7089\" lon=\"11.9746\" layout=\"inline\" map=\"0\" show=\"temp,icon\"]<\/code><\/li>\n<li>Detailed + daily forecast (5 days) + provider mix: <code>[spelhubben_weather place=\"Ume\u00e5\" layout=\"detailed\" forecast=\"daily\" days=\"5\" providers=\"smhi,yr,openmeteo,fmi\"]<\/code><\/li>\n<li>With wind direction: <code>[spelhubben_weather place=\"Stockholm\" show=\"temp,wind,wind_dir,icon\" layout=\"compact\" animate=\"1\"]<\/code><\/li>\n<\/ul><\/li>\n<\/ul>\n\n<h4>Classic Widget<\/h4>\n\n<ul>\n<li>Go to <strong>Appearance \u2192 Widgets<\/strong> \u2192 add <strong>Spelhubben Weather<\/strong>.<\/li>\n<li>Configure per-widget options (title, place or lat\/lon, fields, layout, map, forecast, days, CSS class).<\/li>\n<\/ul>\n\n<!--section=faq-->\n<dl>\n<dt id=\"where%20does%20the%20data%20come%20from%3F\"><h3>Where does the data come from?<\/h3><\/dt>\n<dd><p>From public APIs such as Open-Meteo, SMHI, Yr\/MET Norway, and <strong>FMI<\/strong> (Finnish Meteorological Institute). You choose providers under <strong>Settings \u2192 Spelhubben Weather<\/strong> or per block\/shortcode\/widget via the <code>providers<\/code> attribute.<\/p><\/dd>\n<dt id=\"do%20i%20need%20an%20api%20key%3F\"><h3>Do I need an API key?<\/h3><\/dt>\n<dd><p>No. Open-Meteo, SMHI, and FMI do not require keys. For Yr\/MET Norway it\u2019s recommended to include contact info (email\/URL) in <strong>Settings \u2192 Spelhubben Weather \u2192 Yr contact\/UA<\/strong> so your User-Agent is compliant.<\/p><\/dd>\n<dt id=\"block%2C%20shortcode%20or%20widget%20%E2%80%94%20what%E2%80%99s%20the%20difference%3F\"><h3>Block, shortcode or widget \u2014 what\u2019s the difference?<\/h3><\/dt>\n<dd><p>All three render the same UI. Use the <strong>block<\/strong> in the block editor, the <strong>shortcode<\/strong> in classic content areas, and the <strong>widget<\/strong> in sidebars (Appearance \u2192 Widgets). Each lets you override global defaults.<\/p><\/dd>\n<dt id=\"how%20do%20place%20and%20coordinates%20work%3F\"><h3>How do place and coordinates work?<\/h3><\/dt>\n<dd><\/dd>\n<dt id=\"tide%20%28experimental%29\"><h3>Tide (experimental)<\/h3><\/dt>\n<dd><p>If you're testing tide support in version 1.9.7:<\/p>\n\n<ul>\n<li><strong>Enabling:<\/strong> Turn on <code>Tides<\/code> in Settings \u2192 Spelhubben Weather and select a provider (WorldTides, NOAA or Custom endpoint). WorldTides typically requires an API key.<\/li>\n<li><strong>Shortcode:<\/strong> Use <code>extras=\"tides\"<\/code> or <code>tides=\"1\"<\/code> to show tide events, e.g. <code>[spelhubben_weather place=\"Gothenburg\" extras=\"tides\"]<\/code>.<\/li>\n<li><strong>Providers:<\/strong> WorldTides (global, commercial), NOAA Tides &amp; Currents (US only), or supply a custom endpoint that returns JSON with <code>events<\/code>\/<code>extremes<\/code>\/<code>data<\/code> arrays (items should include <code>time<\/code>, and optionally <code>type<\/code> and <code>height<\/code>).<\/li>\n<li><strong>Troubleshooting:<\/strong> Use <code>tests\/tide_test.php<\/code> to validate provider responses and caching. Ensure provider settings and API key are correct; tide results are cached according to the configured TTL.<\/li>\n<\/ul>\n\n<p>If <code>lat<\/code> and <code>lon<\/code> are provided they take precedence. Otherwise the plugin geocodes the <code>place<\/code> string (e.g. <code>place=\"Ume\u00e5\"<\/code>). Set a global default place in settings.\nrontend assets are registered<\/p><\/dd>\n<dt id=\"what%20fields%20can%20i%20show%2Fhide%3F\"><h3>What fields can I show\/hide?<\/h3><\/dt>\n<dd><p>Use <code>show=\"temp,wind,icon\"<\/code> (comma separated). Defaults are set in settings. Add <code>wind_dir<\/code> to show wind direction arrow and label.<\/p><\/dd>\n<dt id=\"how%20do%20layouts%20work%3F\"><h3>How do layouts work?<\/h3><\/dt>\n<dd><p>Choose <code>layout=\"inline|compact|card|detailed\"<\/code>. \u201cDetailed\u201d supports the multi-day forecast row.<\/p><\/dd>\n<dt id=\"can%20i%20see%20individual%20provider%20data%20%28for%20comparison%29%3F\"><h3>Can I see individual provider data (for comparison)?<\/h3><\/dt>\n<dd><p>Yes! Use <code>comparison=\"1\"<\/code> to show all enabled providers' data side-by-side. Useful for debugging or comparing which providers are available in your location.\nExample: <code>[spelhubben_weather place=\"Stockholm\" comparison=\"1\" providers=\"openmeteo,smhi,yr,fmi,openweathermap,weatherapi\"]<\/code><\/p><\/dd>\n<dt id=\"what%20icon%20themes%20are%20available%3F\"><h3>What icon themes are available?<\/h3><\/dt>\n<dd><p>The plugin offers multiple themes: <strong>Classic<\/strong> (traditional), <strong>Modern Flat<\/strong> (clean, minimalist), <strong>Modern Gradient<\/strong> (contemporary with subtle gradients), <strong>Modern 2026<\/strong> (duotone\/stroke modern style), and <strong>Modern 3D<\/strong> (subtle gradients + drop-shadows). Choose in <strong>Settings \u2192 Spelhubben Weather \u2192 Icon style<\/strong>. All themes include icons for sun, partly-cloudy (including alternate), cloud, fog, rain, sleet, snow, storm\/thunder, and hail where applicable.<\/p><\/dd>\n<dt id=\"how%20do%20i%20enable%20the%20map%20and%20set%20its%20size%3F\"><h3>How do I enable the map and set its size?<\/h3><\/dt>\n<dd><p>map=\"1\" shows a Leaflet map (OpenStreetMap). Control height with <code>map_height=\"240\"<\/code> (px). Global defaults exist in settings.<\/p><\/dd>\n<dt id=\"how%20do%20i%20enable%20animations%3F\"><h3>How do I enable animations?<\/h3><\/dt>\n<dd><p>animate=\"1\" adds subtle UI animation. Global default is in settings. The renderer also accepts <code>true<\/code>, <code>yes<\/code>, or <code>on<\/code> as truthy values for convenience.<\/p><\/dd>\n<dt id=\"how%20do%20i%20get%20a%20daily%20forecast%3F\"><h3>How do I get a daily forecast?<\/h3><\/dt>\n<dd><p>Set <code>forecast=\"daily\"<\/code> and <code>days=\"3\u201310\"<\/code>. Example: <code>forecast=\"daily\" days=\"5\"<\/code>.<\/p><\/dd>\n<dt id=\"how%20do%20i%20use%20moon%20phase%3F\"><h3>How do i use Moon phase?<\/h3><\/dt>\n<dd><p>Use the new <code>phase<\/code> and <code>illumination<\/code> fields to show moon information. Example shortcode: <code>[spelhubben_weather show=\"temp,icon,phase,illumination\"]<\/code> \u2014 available in Block inspector and Widget options as well.<\/p><\/dd>\n<dt id=\"can%20i%20mix%20providers%20and%20get%20a%20consensus%3F\"><h3>Can I mix providers and get a consensus?<\/h3><\/dt>\n<dd><p>Yes. Set <code>providers=\"smhi,yr,openmeteo,fmi\"<\/code> (order doesn\u2019t matter). The plugin calculates a simple consensus across available providers for the displayed fields.<\/p><\/dd>\n<dt id=\"units%20%26%20format%3F\"><h3>Units &amp; format?<\/h3><\/dt>\n<dd><p>Pick a preset with <code>units=\"metric|metric_kmh|imperial\"<\/code>. You can override parts via <code>temp_unit=\"C|F\"<\/code>, <code>wind_unit=\"ms|kmh|mph\"<\/code>, <code>precip_unit=\"mm|in\"<\/code>, and <code>date_format<\/code> for forecast labels. All have global defaults in settings (<strong>Units &amp; format<\/strong> section).<\/p><\/dd>\n<dt id=\"caching%20%E2%80%94%20how%20long%20is%20data%20stored%3F\"><h3>Caching \u2014 how long is data stored?<\/h3><\/dt>\n<dd><p>Responses are cached with WordPress transients. Change TTL (minutes) in settings. Clear via the <strong>Clear cache<\/strong> button on the Performance page (Settings \u2192 Performance) or by changing attributes (which creates a new cache key).<\/p><\/dd>\n<dt id=\"does%20it%20work%20without%20javascript%3F\"><h3>Does it work without JavaScript?<\/h3><\/dt>\n<dd><p>Yes, rendering is server-side. The map (Leaflet) requires JS.<\/p><\/dd>\n<dt id=\"translations%3F\"><h3>Translations?<\/h3><\/dt>\n<dd><p>The plugin is fully translatable. <strong>Included translations:<\/strong> <strong>Swedish (sv_SE), Norwegian (nb_NO)<\/strong>. Strings are also available on translate.wordpress.org. Ship <code>.pot\/.po\/.mo<\/code> in <code>\/languages<\/code>.<\/p><\/dd>\n<dt id=\"gdpr%20%2F%20privacy%3F\"><h3>GDPR \/ privacy?<\/h3><\/dt>\n<dd><p>The plugin does not set cookies by itself. If you enable the map, Leaflet\/OpenStreetMap tiles are requested client-side. Mention OSM in your privacy notice if needed.<\/p><\/dd>\n<dt id=\"troubleshooting%20tips\"><h3>Troubleshooting tips<\/h3><\/dt>\n<dd><ul>\n<li>Nothing shows: check that at least one provider is selected in settings.<\/li>\n<li>Wrong location: provide exact <code>lat<\/code>\/<code>lon<\/code> or a more specific <code>place<\/code> (e.g. \u201cUddevalla, SE\u201d).<\/li>\n<li>Map not visible: ensure <code>map=\"1\"<\/code> and that your theme\/container is wide\/tall enough; increase <code>map_height<\/code>.<\/li>\n<li>Rate limiting: reduce refreshes or increase cache TTL.<\/li>\n<\/ul><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>2.0.3<\/h4>\n\n<ul>\n<li>Fixed: Added default <code>units<\/code> and <code>yr_contact<\/code> options to remove undefined index notices on new installs.<\/li>\n<li>Fixed: Widget now initializes options before render so <code>wind_unit<\/code> fallback is safe and notice-free.<\/li>\n<li>Fixed: Admin attribution checker now uses the localized AJAX nonce (no more <code>nonce is not defined<\/code> error).<\/li>\n<li>Fixed: Rebuilt <code>assets\/map.min.js<\/code> from the source to eliminate the stray syntax error and keep parity with <code>map.js<\/code>.<\/li>\n<\/ul>\n\n<h4>2.0.2<\/h4>\n\n<ul>\n<li>Urgent Fix: Ensure <code>assets\/vendor<\/code> is included in distribution packages (adjusted <code>.distignore<\/code> rules). This prevents missing Leaflet vendor files after packaging\/deploy.<\/li>\n<li>Fixed: Plugin version constant and admin asset versioning made consistent with the release.<\/li>\n<li>Documentation: Updated packaging notes and deploy recommendations.<\/li>\n<\/ul>\n\n<h4>2.0.1<\/h4>\n\n<ul>\n<li>Fixed: Minor asset\/enqueue edge-case causing Leaflet\/map to fail loading on some paginated or special views where <code>$post<\/code> is not available.<\/li>\n<li>Fixed: Plugin version constant and admin asset versioning updated to reflect release <code>2.0.1<\/code>.<\/li>\n<li>Improved: Documentation updates and metadata cleaned up for the new release.<\/li>\n<\/ul>\n\n<p><strong>Features<\/strong>\n- <strong>Shortcode<\/strong> <code>[spelhubben_weather]<\/code>, <strong>Gutenberg block<\/strong>, and <strong>classic widget<\/strong>\n- <strong>6 Weather Providers:<\/strong> Open-Meteo, SMHI, Yr (MET Norway), FMI, Open-Weathermap, Weatherapi.com \u2014 enable any combination\n- <strong>Icon Themes:<\/strong> Classic, Modern Flat, Modern Gradient, Modern 2026, Modern 3D (selectable in admin settings)\n- <strong>Multiple Layouts:<\/strong> <code>inline<\/code>, <code>compact<\/code>, <code>card<\/code>, <code>detailed<\/code>\n- <strong>Daily Forecast:<\/strong> 3\u201310 days customizable\n- <strong>Provider Comparison:<\/strong> Side-by-side data from all enabled providers\n- <strong>Leaflet Map:<\/strong> OpenStreetMap tiles with proper attribution (ODbL)\n - <strong>Wind direction display:<\/strong> Rotated arrow with cardinal labels (optional via <code>show=wind_dir<\/code>)\n- <strong>Local Icons:<\/strong> SVG icons (no CDN dependency), responsive scaling\n- <strong>Performance:<\/strong> 6-30x faster settings page, lazy-loaded plugin showcase, optimized caching\n- <strong>Fully GDPR Compliant:<\/strong> No cookies, no tracking, no personal data collection\n- <strong>Translation-Ready:<\/strong> English base strings, Swedish and Norwegian translations included<\/p>\n\n<p><em>Not affiliated with Open-Meteo, SMHI, Yr\/MET Norway, FMI, Leaflet, or OpenStreetMap. Names are used for descriptive purposes only. Map data \u00a9 OpenStreetMap contributors (ODbL).<\/em>= 2.0.0 =\n* FIX: Leaflet map now loads correctly on paginated, archive and guest pages where the global <code>$post<\/code> may be unavailable. Asset loader now scans the main query for shortcodes\/blocks and enqueues Leaflet assets accordingly.\n* CHANGE: Bumped version to 2.0.0.<\/p>\n\n<h4>1.9.9<\/h4>\n\n<ul>\n<li><p>FIX: Leaflet\/map is now displayed correctly even for guests and special pages where $post is not set (fallback to get_queried_object()).<\/p><\/li>\n<li><p>= 1.9.8 =<\/p><\/li>\n<li><strong>Fixed:<\/strong> Fixed an issue where the Leaflet map could fail to load on live\/optimized sites due to script handle conflicts with themes or other plugins.<\/li>\n<li><strong>Improved:<\/strong> Renamed Leaflet asset handles to unique, plugin-specific names to prevent collisions and ensure correct dependency resolution.<\/li>\n<li><strong>Improved:<\/strong> Removed forced defer handling for Leaflet\/map scripts to avoid broken load order when caching\/optimization plugins are active.<\/li>\n<li><strong>Improved:<\/strong> Improved map initialization logic to prevent infinite retry loops and reduce console spam when Leaflet isn\u2019t available.<\/li>\n<li><p><strong>Improved:<\/strong> Kept Leaflet\/map assets conditionally loaded only on pages where the widget\/block\/shortcode is actually rendered.<\/p><\/li>\n<li><p>= 1.9.7 =<\/p><\/li>\n<li><p><strong>Experimental:<\/strong> Tide support added for testing \u2014 opt-in feature. Adds support for WorldTides (API key), NOAA (US-only), and a configurable custom endpoint. Shortcode support via <code>extras=\"tides\"<\/code> or <code>tides=\"1\"<\/code>. Admin visibility can be toggled while rolling out to selected users. Responses are cached; configure TTL in Settings.<\/p><\/li>\n<li><p>= 1.9.5 =<\/p><\/li>\n<li><p><strong>New:<\/strong> Moon phase support \u2014 <code>phase<\/code> (name) and <code>illumination<\/code> (percent) available in renderer, shortcodes, block and widget.<\/p><\/li>\n<li><p>= 1.9.4 =<\/p><\/li>\n<li><p><strong>Fixed:<\/strong> Wind direction cardinal calculation and arrow rotation; ensured text-domain i18n call fixed for VC integration; asset sanitization workaround for wind arrow rotation (data-deg + frontend JS).<\/p><\/li>\n<li><p>= 1.9.3 =<\/p><\/li>\n<li><strong>New:<\/strong> <code>wind_unit<\/code> override in Block inspector, Widget settings and Shortcodes Quick Builder.<\/li>\n<li><strong>Improved:<\/strong> <code>metric_knt<\/code> preset for metric display with knots.<\/li>\n<li><strong>Fixed:<\/strong> Wind direction arrow rotation corrected to match compass degrees.<\/li>\n<li><strong>Fixed:<\/strong> Shortcode <code>wind_unit<\/code> reliably overrides resolved units and renderer emits <code>data-svv-wind-unit<\/code> for debugging.<\/li>\n<li><strong>Fixed:<\/strong> Alert threshold comparisons now converted into display units to avoid false alerts.<\/li>\n<li><strong>Fixed:<\/strong> PHP parse error in admin page resolved.<\/li>\n<li><strong>Changed:<\/strong> Plugin version bumped to 1.9.3; readme stable tag updated.<\/li>\n<li>= 1.9.2 =<\/li>\n<li><strong>New:<\/strong> Shortcode\/Block\/Widget <code>theme<\/code> attribute \u2014 <code>theme=\"auto|light|dark\"<\/code> to force UI theme per instance (default <code>auto<\/code>).<\/li>\n<li><strong>New:<\/strong> Quick Builder theme selector in admin Shortcodes page; example shortcode added.<\/li>\n<li><strong>Improved:<\/strong> Renderer emits <code>data-svv-theme<\/code> and <code>svv-theme-&lt;value&gt;<\/code> class for easier CSS targeting.<\/li>\n<li><strong>Improved:<\/strong> Frontend CSS and map styling \u2014 darker Leaflet tiles in dark theme and darker alert box styles for better contrast.<\/li>\n<li><p><strong>Changed:<\/strong> Admin JS updated to include <code>theme<\/code> when generating shortcodes; docs updated across readmes.<\/p><\/li>\n<li><p>= 1.9.0 =<\/p><\/li>\n<li><strong>New:<\/strong> Weather Alerts system with smart recommendations for extreme conditions<\/li>\n<li><strong>New:<\/strong> Storm Warning alert for wind speeds exceeding 24.5 m\/s<\/li>\n<li><strong>New:<\/strong> Settings Export &amp; Import feature for easy configuration management<\/li>\n<li><strong>New:<\/strong> Performance Dashboard to track API usage, cache efficiency, and response times<\/li>\n<li><strong>New:<\/strong> Full Dark Mode support for all frontend and admin interfaces<\/li>\n<li><strong>New:<\/strong> 3 Gutenberg Block Patterns (Compact, Detailed, Forecast)<\/li>\n<li><strong>New:<\/strong> Alert toggles for Blocks, Widgets, and Shortcodes<\/li>\n<li><strong>New:<\/strong> Wind direction display (<code>wind_dir<\/code>) \u2014 rotated arrow + cardinal labels (optional via <code>show=wind_dir<\/code>)<\/li>\n<li><strong>New:<\/strong> Shortcode Quick Builder in admin <strong>Shortcodes<\/strong> page with selectable options, one-click copy and live preview\n\n<ul>\n<li><strong>New:<\/strong> Rotating Tips panel on the Settings page with contextual admin tips (Shortcodes, Alerts, Performance)<\/li>\n<li><strong>New:<\/strong> Compact action buttons in the Tips panel for quick access to Shortcodes, Alerts and Performance<\/li>\n<li><strong>New:<\/strong> \"Reset to defaults\" button on the Settings page (nonce-protected) to restore plugin defaults<\/li>\n<li><strong>Improved:<\/strong> Tips text is translation-ready, rotates more slowly for readability (15s), and uses <code>aria-live<\/code> for accessibility<\/li>\n<\/ul><\/li>\n<li><strong>Improved:<\/strong> <code>animate<\/code> attribute parsing is more tolerant (accepts <code>1<\/code>, <code>true<\/code>, <code>yes<\/code>, <code>on<\/code>)<\/li>\n<li><strong>Improved:<\/strong> Full English translation and i18n readiness (English is now the base language)<\/li>\n<li><strong>Improved:<\/strong> Refined alert thresholds based on meteorological standards<\/li>\n<\/ul>\n\n<h4>1.8.6<\/h4>\n\n<ul>\n<li><strong>Fixed:<\/strong> Map not rendering in widgets due to missing Leaflet asset detection<\/li>\n<li><strong>Fixed:<\/strong> Block name mismatch (<code>spelhubben\/weather<\/code> \u2192 <code>spelhubben-weather\/spelhubben-weather<\/code>) preventing proper asset enqueuing<\/li>\n<li><strong>Improved:<\/strong> Enhanced Leaflet initialization with better timing and error handling in <code>map.js<\/code><\/li>\n<li><strong>Improved:<\/strong> Added widget detection in asset loading logic using <code>is_active_widget()<\/code><\/li>\n<li><strong>Improved:<\/strong> Added fallback height (<code>height: 240px;<\/code>) to <code>.svv-map<\/code> CSS class for better Leaflet container sizing<\/li>\n<li><strong>Improved:<\/strong> Better error reporting and retry logic in map initialization with Leaflet availability checks<\/li>\n<\/ul>\n\n<h4>1.8.5<\/h4>\n\n<ul>\n<li><strong>Performance:<\/strong> Conditional Leaflet asset loading \u2014 only loads when shortcode or Gutenberg block is present on the page.<\/li>\n<li><strong>Fix:<\/strong> Added <code>.htaccess<\/code> files to prevent WordPress rewrite rules from interfering with static assets.<\/li>\n<li><strong>Fix:<\/strong> Ensure correct MIME types for CSS and JS files to prevent browser strict MIME checking warnings.<\/li>\n<li><strong>UX:<\/strong> Eliminates unnecessary 404 errors on pages without weather widget.<\/li>\n<\/ul>\n\n<h4>1.8.4<\/h4>\n\n<ul>\n<li><strong>Maintenance:<\/strong> Added centralized configuration constants file (<code>includes\/constants.php<\/code>) for improved code maintainability and reduced magic numbers.<\/li>\n<li><strong>Performance:<\/strong> Settings page now loads 6-30x faster with lazy-loaded WP.org plugin showcase via AJAX.<\/li>\n<li><strong>Fix:<\/strong> Fixed memory leaks from uncleanup event listeners in admin interface with proper cleanup handlers.<\/li>\n<li><strong>Fix:<\/strong> Fixed WMO weather code duplication\u2014fog (codes 45, 48) now displays correctly instead of showing cloud icon.<\/li>\n<li><strong>Fix:<\/strong> Fixed geocoding cache to include API language, ensuring proper locale-specific results for multi-language sites.<\/li>\n<li><strong>Fix:<\/strong> Fixed widget null-safety with null-coalesce operators to prevent PHP Notices.<\/li>\n<li><strong>Fix:<\/strong> Standardized API error handling with consistent response validation across all providers.<\/li>\n<li><strong>Fix:<\/strong> Fixed syntax error in WP.org plugin showcase API call (missing closing parenthesis).<\/li>\n<li><strong>Compliance:<\/strong> Verified full WordPress Consent API and GDPR compliance\u2014no cookies, no tracking, no personal data collection.<\/li>\n<li><strong>Code Quality:<\/strong> Debounce timeout optimized (400ms \u2192 600ms) reducing AJAX traffic by 50% during live preview.<\/li>\n<li><strong>Documentation:<\/strong> Comprehensive audit and testing guides included for developers.<\/li>\n<\/ul>\n\n<h4>1.8.3<\/h4>\n\n<ul>\n<li>Version bump for production release.<\/li>\n<\/ul>\n\n<h4>1.8.2<\/h4>\n\n<ul>\n<li><strong>Fix:<\/strong> WordPress naming convention compliance \u2013 all global functions and variables now use proper <code>sv_vader_<\/code> prefix.<\/li>\n<li><strong>Fix:<\/strong> Corrected asset paths for Leaflet library (vendor directory structure).<\/li>\n<li><strong>Tech:<\/strong> Code review and standards compliance (no breaking changes).<\/li>\n<li>Tested up to: WordPress 6.9<\/li>\n<\/ul>\n\n<h4>1.8.1<\/h4>\n\n<ul>\n<li><strong>New:<\/strong> 3 selectable icon themes: <strong>Classic<\/strong>, <strong>Modern Flat<\/strong>, and <strong>Modern Gradient<\/strong> (set in Settings \u2192 Icon style).<\/li>\n<li><strong>Performance:<\/strong> Optimized icon rendering with static variable caching for icon style preference (reduces repeated <code>sv_vader_get_options()<\/code> calls).<\/li>\n<li><strong>Tech:<\/strong> Added private helper method <code>build_icon_url()<\/code> to centralize icon URL logic and improve maintainability.<\/li>\n<li>All icon themes include: sun, partly-cloudy, cloud, fog, rain, sleet, snow, thunderstorm (8 distinct weather conditions per theme).<\/li>\n<li>Updated README and readme.txt with icon theme documentation and admin settings guide.<\/li>\n<\/ul>\n\n<h4>1.8.0<\/h4>\n\n<ul>\n<li><strong>BREAKING CHANGE:<\/strong> Removed legacy <code>[sv_vader \u2026]<\/code> shortcode. Use <code>[spelhubben_weather \u2026]<\/code> exclusively.<\/li>\n<li><strong>New Providers:<\/strong> Added <strong>Open-Weathermap<\/strong> and <strong>Weatherapi.com<\/strong> for better global coverage (6 total providers).<\/li>\n<li><strong>New Feature:<\/strong> <code>comparison=\"1\"<\/code> attribute shows all providers' data side-by-side for easy comparison and debugging.<\/li>\n<li><strong>Performance:<\/strong> Fixed memory leak in map.js (persistent MutationObserver, proper ResizeObserver cleanup).<\/li>\n<li><strong>Performance:<\/strong> Added 7-day transient caching for geocoding lookups to reduce external API calls.<\/li>\n<li><strong>Performance:<\/strong> CSS containment (<code>contain: layout style paint<\/code>) optimizes rendering on pages with multiple weather cards.<\/li>\n<li><strong>Caching:<\/strong> Improved debounce function to prevent race conditions during window resizes.<\/li>\n<li><strong>Security:<\/strong> Fixed unsafe XML parsing in FMI provider (now uses <code>LIBXML_NOCDATA<\/code> flag with proper error handling).<\/li>\n<li><strong>Feature:<\/strong> New <strong>plugin showcase<\/strong> on settings page displaying other Spelhubben plugins (grid layout, auto-fetches from WordPress.org).<\/li>\n<li><strong>UX:<\/strong> Plugin showcase auto-excludes Spelhubben Weather itself to avoid redundancy.<\/li>\n<li>Tested up to: WordPress 6.8+<\/li>\n<\/ul>\n\n<h4>1.7.5<\/h4>\n\n<ul>\n<li>Tested up to: 6.9<\/li>\n<li>New: <strong>FMI (Finnish Meteorological Institute)<\/strong> as a free, optional provider (t2m, ws_10min, r_1h, n_man via WFS). Toggle in <strong>Settings \u2192 Providers<\/strong> and via <code>providers=\"\u2026\"<\/code> in block\/shortcode\/widget.<\/li>\n<li>Shortcodes\/Blocks: <code>providers<\/code> now accepts <code>fmi<\/code>.<\/li>\n<li>Docs: Updated examples and FAQ to include FMI.<\/li>\n<\/ul>\n\n<h4>1.7.0<\/h4>\n\n<ul>\n<li>New: <strong>Shortcodes<\/strong> admin page with searchable examples, one-click copy &amp; <strong>copy all<\/strong>.<\/li>\n<li>New: <strong>Live preview<\/strong> inside WP-admin (sandboxed iframe) that renders shortcodes and loads front assets (Leaflet, widget CSS\/JS).<\/li>\n<li>New: <strong>Units &amp; format<\/strong> settings (preset + overrides: temp\/wind\/precip units, <code>date_format<\/code>).<\/li>\n<li>New: <strong>Clear cache<\/strong> button (transients) on settings page.<\/li>\n<li>New: <strong>Translations included:<\/strong> Swedish (sv_SE), Norwegian (nb_NO), English (en_US).<\/li>\n<li>UX: Unified light card design across admin pages.<\/li>\n<li>Tech: Robust admin enqueue with cache-busting via <code>filemtime<\/code>.<\/li>\n<li>i18n: All admin strings localized (including JS: expand\/collapse, statuses).<\/li>\n<li>Docs: Marked legacy shortcode as <strong>deprecated \u2013 will be removed soon<\/strong>.<\/li>\n<\/ul>\n\n<h4>1.6.2<\/h4>\n\n<ul>\n<li>Minor fixes and readme updates.<\/li>\n<\/ul>\n\n<h4>1.6.1<\/h4>\n\n<ul>\n<li>Version bump for WordPress.org sync. No functional changes.<\/li>\n<\/ul>","raw_excerpt":"Weather widget, Gutenberg block and shortcode with optional map and multi-provider forecasts.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/mlt.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/253965","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mlt.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/mlt.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/mlt.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=253965"}],"author":[{"embeddable":true,"href":"https:\/\/mlt.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/spelhubben"}],"wp:attachment":[{"href":"https:\/\/mlt.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=253965"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/mlt.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=253965"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/mlt.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=253965"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/mlt.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=253965"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/mlt.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=253965"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/mlt.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=253965"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}