[WordPress] 外掛分享: WFY24 Weather Widget

首頁 › 外掛目錄 › WFY24 Weather Widget
WordPress 外掛 WFY24 Weather Widget 的封面圖片
40+
安裝啟用
★★★★★
5/5 分(1 則評價)
45 天前
最後更新
—
問題解決
WordPress 6.0+ PHP 8.1+ v2.5.0 上架:2026-04-28

內容簡介

WFY24 Weather Widget 是一款免費的天氣小工具,能夠輕鬆嵌入到任何 WordPress 網站的文章、頁面或側邊欄中,提供即時天氣資訊,並具備簡單的設置流程。

【主要功能】
• 一鍵啟用,無需外部註冊
• 提供即時天氣數據與五天預報
• 支援 51 種語言,符合網站語言設定
• 輕量級腳本,非同步加載不影響頁面
• 自動定位功能,根據訪客 IP 獲取位置
• 可選擇淺色、深色或自動主題

外掛標籤

開發者團隊

⬇ 下載最新版 (v2.5.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「WFY24 Weather Widget」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

WFY24 Weather Widget lets you embed a free, fully-featured weather widget on any WordPress site — in any post, page, or sidebar — with a single shortcode, Gutenberg block, or built-in sidebar widget.
Zero-friction setup
Activating the plugin opens Settings → WFY24 Weather, one screen with everything on it:

Activate now (free) — check the pre-filled admin email and your defaults (city, language, theme, units) and click once. The plugin registers your site with wfy24.com and the widget is live. No external signup, no copy/paste.
Connect an existing WFY24 widget — already have a key from an earlier install, from the wfy24.com widget builder, or from the main site of your Multisite? Paste it instead.
Quick actions on the dashboard — publish a “Weather” page with the widget ready to go, or add a compact widget to your first sidebar, each with one click.

Features

Free version with a small wfy24.com attribution link under each widget — stated on the activation screen before you click Activate. No credit card, no hidden fees, no ads. A Pro plan that removes the link is in preparation (Pro is coming — notify me)
Lightweight — one small script, loaded asynchronously in the footer; nothing blocks your page
Real-time data — temperature, conditions, wind, humidity, 5-day forecast
51 languages — the widget defaults to your site language; pick any of the 51 per site or per widget
Admin interface in 15 locales — the settings screen and activation form are translated into Bulgarian, Czech, Dutch, French, German (de_DE / de_AT / de_CH), Greek, Hungarian, Italian, Polish, Portuguese (pt_PT / pt_BR), Spanish and Swedish (strings added in 2.5.0 read in English until the catalogues are refreshed), and the activation link opens wfy24.com in your own language
Auto location — pin a city, or leave it empty for the visitor’s approximate location (IP-based, no prompt); precise location with the visitor’s permission is an opt-in toggle
Light / Dark / Auto theme — matches your site automatically
7 layouts — Classic, Compact, Minimal, Badge, Forecast, Air Quality, Air Quality + Weather (wide)
Shadow DOM isolation — zero CSS conflicts with your theme
Zero dependencies — no jQuery, no React, no bloat
Multi-source data — ICON-D2/EU/Global NWP with GFS fallback, blended with station observations

Usage
Shortcode:
[wfy24_weather]

Override per instance:
[wfy24_weather city="paris-fr2988507" theme="dark" variant="forecast" lang="fr"]

Or use the WFY24 Weather Widget block in the Gutenberg editor for a visual interface.
Attribution
The free version of this plugin displays a small attribution link — its visible text is wfy24.com — under each rendered widget. The activation screen says so above the “Activate now (free)” button: “By activating you agree to display a small attribution link (wfy24.com) under each widget”; clicking that button is your explicit permission to enable the link. A Pro plan that removes the attribution is in preparation; until it launches the plugin shows “Pro is coming — notify me” (wfy24.com/en/widgets/pro). Existing Pro subscriptions keep hiding the link.
External service
This plugin connects to the WFY24 weather service at https://www.wfy24.com:

Plugin activation: POSTs to /api/widget/register-from-plugin with the email you confirmed in the activation form (pre-filled from Settings → General; editable inline before activation), site name, site domain, WordPress version, plugin version and site locale, in order to automatically provision your free API key. No activation happens without your explicit click on the “Activate now (free)” button. If wfy24.com already holds a widget for that email and domain, it answers with the first characters of the existing key and a replacement-key link; the plugin then shows the “Connect an existing WFY24 widget” form instead of creating a duplicate. Pasting a key into that form sends nothing.
City search (admin only, when typing in the Default City field): the plugin’s REST endpoint /wp-json/wfy24/v1/cities proxies your search query (e.g. “athens”) to /api/places/search server-side. Your search query is sent along with a User-Agent identifying the plugin. Results (slug + label + country flag) are cached for 5 minutes per query. The admin’s IP is never exposed cross-origin because the request is server-to-server.
Widget rendering (client-side on visitor browsers): loads widget.js and queries /api/widget/data. The widget sends the API key, the city slug when one is set, and the language/units/theme preferences. Location: with a default city set, that city is shown and no visitor location is used. With no default city and the “Auto-detect visitor location” toggle off (the default), the widget shows the weather for the visitor’s approximate location derived from the IP address of the request — no browser prompt, no coordinates. With the toggle on, the browser asks the visitor for permission; if granted, the visitor’s latitude/longitude is sent, otherwise the IP-based location is used. No personal data is stored beyond standard anonymized request logs for rate limiting.
Pro status (admin pages only): once an hour, on an admin page load, the plugin GETs /api/widget/pro/status with the first characters of the key to learn whether the key is on the Pro plan (this is what hides the attribution link for Pro sites). After a failed request it waits an hour before trying again.
Pro checkout / billing portal (only if the admin clicks “Upgrade now” or “Manage subscription”, and only while Pro is available): POSTs to /api/widget/pro/checkout and /api/widget/pro/portal — the portal request carries the site’s full key — to open a Stripe Checkout or Stripe Billing Portal session. While Pro is parked (the default in this version) the upgrade button is not shown and the checkout handler refuses to run; site owners who want the checkout can define WFY24_PRO_ENABLED as true in wp-config.php.

Links:

WFY24 Terms of Service: https://www.wfy24.com/en/terms
WFY24 Privacy Policy: https://www.wfy24.com/en/privacy-policy

Multisite Support
The plugin is multisite-compatible. All settings (API key, defaults, page) are stored per-subsite using get_option()/add_option(), so each subsite operates independently.

Network Activation does not contact wfy24.com. It only loads the plugin code on every subsite. No admin_email is sent, no API key is created, no automatic phone-home occurs.
Each subsite admin activates individually. When the admin opens Settings → WFY24 Weather on a subsite and clicks “Activate now (free)”, the plugin sends that subsite’s domain and Settings → General → Email Address to wfy24.com to obtain a domain-bound API key. The admin is shown a dynamic disclosure of the exact values that will be transmitted before clicking — no consent is collected on behalf of admins of other subsites.
New subsites added later remain inactive until their admin activates them. The widget will not render on a subsite that has not been activated or connected; no data leaves WordPress until an admin explicitly clicks Activate on that subsite.
No centralized network admin panel exists in this version — each subsite has its own settings page. A network-level overview is on the roadmap.
API keys are domain-bound. A key issued for site-a.example.com will not function on site-b.example.com, which means subdomain and domain-mapped multisite installs work correctly out of the box (each subsite gets its own key for its own domain).
Sub-directory installs share one host. On example.com/site-a, example.com/site-b … every subsite reports the same domain, example.com, so wfy24.com sees one site. 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.

延伸相關外掛

文章
Filter
Mastodon