Spelhubben Weather

Changelog

2.0.0

  • FIX: Leaflet map now loads correctly on paginated, archive and guest pages where the global $post may be unavailable. Asset loader now scans the main query for shortcodes/blocks and enqueues Leaflet assets accordingly.
  • CHANGE: Bumped version to 2.0.0.

1.9.9

  • FIX: Leaflet/map is now displayed correctly even for guests and special pages where $post is not set (fallback to get_queried_object()).

  • = 1.9.8 =

  • Fixed: 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.
  • Improved: Renamed Leaflet asset handles to unique, plugin-specific names to prevent collisions and ensure correct dependency resolution.
  • Improved: Removed forced defer handling for Leaflet/map scripts to avoid broken load order when caching/optimization plugins are active.
  • Improved: Improved map initialization logic to prevent infinite retry loops and reduce console spam when Leaflet isn’t available.
  • Improved: Kept Leaflet/map assets conditionally loaded only on pages where the widget/block/shortcode is actually rendered.

  • = 1.9.7 =

  • Experimental: Tide support added for testing — opt-in feature. Adds support for WorldTides (API key), NOAA (US-only), and a configurable custom endpoint. Shortcode support via extras=”tides” or tides=”1″. Admin visibility can be toggled while rolling out to selected users. Responses are cached; configure TTL in Settings.

  • = 1.9.5 =

  • New: Moon phase support — phase (name) and illumination (percent) available in renderer, shortcodes, block and widget.

  • = 1.9.4 =

  • Fixed: 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).

  • = 1.9.3 =

  • New: wind_unit override in Block inspector, Widget settings and Shortcodes Quick Builder.
  • Improved: metric_knt preset for metric display with knots.
  • Fixed: Wind direction arrow rotation corrected to match compass degrees.
  • Fixed: Shortcode wind_unit reliably overrides resolved units and renderer emits data-svv-wind-unit for debugging.
  • Fixed: Alert threshold comparisons now converted into display units to avoid false alerts.
  • Fixed: PHP parse error in admin page resolved.
  • Changed: Plugin version bumped to 1.9.3; readme stable tag updated.
  • = 1.9.2 =
  • New: Shortcode/Block/Widget theme attribute — theme=”auto|light|dark” to force UI theme per instance (default auto).
  • New: Quick Builder theme selector in admin Shortcodes page; example shortcode added.
  • Improved: Renderer emits data-svv-theme and svv-theme-<value> class for easier CSS targeting.
  • Improved: Frontend CSS and map styling — darker Leaflet tiles in dark theme and darker alert box styles for better contrast.
  • Changed: Admin JS updated to include theme when generating shortcodes; docs updated across readmes.

  • = 1.9.0 =

  • New: Weather Alerts system with smart recommendations for extreme conditions
  • New: Storm Warning alert for wind speeds exceeding 24.5 m/s
  • New: Settings Export & Import feature for easy configuration management
  • New: Performance Dashboard to track API usage, cache efficiency, and response times
  • New: Full Dark Mode support for all frontend and admin interfaces
  • New: 3 Gutenberg Block Patterns (Compact, Detailed, Forecast)
  • New: Alert toggles for Blocks, Widgets, and Shortcodes
  • New: Wind direction display (wind_dir) — rotated arrow + cardinal labels (optional via show=wind_dir)
  • New: Shortcode Quick Builder in admin Shortcodes page with selectable options, one-click copy and live preview
    • New: Rotating Tips panel on the Settings page with contextual admin tips (Shortcodes, Alerts, Performance)
    • New: Compact action buttons in the Tips panel for quick access to Shortcodes, Alerts and Performance
    • New: “Reset to defaults” button on the Settings page (nonce-protected) to restore plugin defaults
    • Improved: Tips text is translation-ready, rotates more slowly for readability (15s), and uses aria-live for accessibility
  • Improved: animate attribute parsing is more tolerant (accepts 1, true, yes, on)
  • Improved: Full English translation and i18n readiness (English is now the base language)
  • Improved: Refined alert thresholds based on meteorological standards

1.8.6

  • Fixed: Map not rendering in widgets due to missing Leaflet asset detection
  • Fixed: Block name mismatch (spelhubben/weather → spelhubben-weather/spelhubben-weather) preventing proper asset enqueuing
  • Improved: Enhanced Leaflet initialization with better timing and error handling in map.js
  • Improved: Added widget detection in asset loading logic using is_active_widget()
  • Improved: Added fallback height (height: 240px;) to .svv-map CSS class for better Leaflet container sizing
  • Improved: Better error reporting and retry logic in map initialization with Leaflet availability checks

1.8.5

  • Performance: Conditional Leaflet asset loading — only loads when shortcode or Gutenberg block is present on the page.
  • Fix: Added .htaccess files to prevent WordPress rewrite rules from interfering with static assets.
  • Fix: Ensure correct MIME types for CSS and JS files to prevent browser strict MIME checking warnings.
  • UX: Eliminates unnecessary 404 errors on pages without weather widget.

1.8.4

  • Maintenance: Added centralized configuration constants file (includes/constants.php) for improved code maintainability and reduced magic numbers.
  • Performance: Settings page now loads 6-30x faster with lazy-loaded WP.org plugin showcase via AJAX.
  • Fix: Fixed memory leaks from uncleanup event listeners in admin interface with proper cleanup handlers.
  • Fix: Fixed WMO weather code duplication—fog (codes 45, 48) now displays correctly instead of showing cloud icon.
  • Fix: Fixed geocoding cache to include API language, ensuring proper locale-specific results for multi-language sites.
  • Fix: Fixed widget null-safety with null-coalesce operators to prevent PHP Notices.
  • Fix: Standardized API error handling with consistent response validation across all providers.
  • Fix: Fixed syntax error in WP.org plugin showcase API call (missing closing parenthesis).
  • Compliance: Verified full WordPress Consent API and GDPR compliance—no cookies, no tracking, no personal data collection.
  • Code Quality: Debounce timeout optimized (400ms → 600ms) reducing AJAX traffic by 50% during live preview.
  • Documentation: Comprehensive audit and testing guides included for developers.

1.8.3

  • Version bump for production release.

1.8.2

  • Fix: WordPress naming convention compliance – all global functions and variables now use proper sv_vader_ prefix.
  • Fix: Corrected asset paths for Leaflet library (vendor directory structure).
  • Tech: Code review and standards compliance (no breaking changes).
  • Tested up to: WordPress 6.9

1.8.1

  • New: 3 selectable icon themes: Classic, Modern Flat, and Modern Gradient (set in Settings → Icon style).
  • Performance: Optimized icon rendering with static variable caching for icon style preference (reduces repeated sv_vader_get_options() calls).
  • Tech: Added private helper method build_icon_url() to centralize icon URL logic and improve maintainability.
  • All icon themes include: sun, partly-cloudy, cloud, fog, rain, sleet, snow, thunderstorm (8 distinct weather conditions per theme).
  • Updated README and readme.txt with icon theme documentation and admin settings guide.

1.8.0

  • BREAKING CHANGE: Removed legacy [sv_vader …] shortcode. Use [spelhubben_weather …] exclusively.
  • New Providers: Added Open-Weathermap and Weatherapi.com for better global coverage (6 total providers).
  • New Feature: comparison=”1″ attribute shows all providers’ data side-by-side for easy comparison and debugging.
  • Performance: Fixed memory leak in map.js (persistent MutationObserver, proper ResizeObserver cleanup).
  • Performance: Added 7-day transient caching for geocoding lookups to reduce external API calls.
  • Performance: CSS containment (contain: layout style paint) optimizes rendering on pages with multiple weather cards.
  • Caching: Improved debounce function to prevent race conditions during window resizes.
  • Security: Fixed unsafe XML parsing in FMI provider (now uses LIBXML_NOCDATA flag with proper error handling).
  • Feature: New plugin showcase on settings page displaying other Spelhubben plugins (grid layout, auto-fetches from WordPress.org).
  • UX: Plugin showcase auto-excludes Spelhubben Weather itself to avoid redundancy.
  • Tested up to: WordPress 6.8+

1.7.5

  • Tested up to: 6.9
  • New: FMI (Finnish Meteorological Institute) as a free, optional provider (t2m, ws_10min, r_1h, n_man via WFS). Toggle in Settings → Providers and via providers=”…” in block/shortcode/widget.
  • Shortcodes/Blocks: providers now accepts fmi.
  • Docs: Updated examples and FAQ to include FMI.

1.7.0

  • New: Shortcodes admin page with searchable examples, one-click copy & copy all.
  • New: Live preview inside WP-admin (sandboxed iframe) that renders shortcodes and loads front assets (Leaflet, widget CSS/JS).
  • New: Units & format settings (preset + overrides: temp/wind/precip units, date_format).
  • New: Clear cache button (transients) on settings page.
  • New: Translations included: Swedish (sv_SE), Norwegian (nb_NO), English (en_US).
  • UX: Unified light card design across admin pages.
  • Tech: Robust admin enqueue with cache-busting via filemtime.
  • i18n: All admin strings localized (including JS: expand/collapse, statuses).
  • Docs: Marked legacy shortcode as deprecated – will be removed soon.

1.6.2

  • Minor fixes and readme updates.

1.6.1

  • Version bump for WordPress.org sync. No functional changes.

Plugin Website
Visit website

Version:
2.0.0
Last Updated
March 8, 2026
Active Installs
10
Requires
WordPress 6.8
Tested Up To
WordPress 6.9.1
Requires PHP
7.4

Share Post

Join our newsletter.

Get insights into what’s happening at ChangelogWP right in your inbox. We don’t believe in spam.