[WordPress] 外掛分享: Live Data Display

首頁外掛目錄 › Live Data Display
WordPress 外掛 Live Data Display 的封面圖片
30+
安裝啟用
★★★★★
5/5 分(1 則評價)
32 天前
最後更新
問題解決
WordPress 5.5+ PHP 7.4+ v2.0.1 上架:2019-03-01

內容簡介

Live Data Display 是一款強大的 WordPress 外掛,能透過 HTTP 加載 JSON 資料並在網站上即時顯示更新的數值,無需重新載入頁面。非常適合用於即時走馬燈、股價、體育賽果、天氣數據、感測器讀數等實時數據來源。

【主要功能】
• 多個獨立數據槽:可配置多個數據槽,每個槽擁有自己的 API URL 和刷新間隔
• 短碼與 Gutenberg 區塊:可隨意放置數據
• 自動刷新:每個槽可獨立刷新,最小間隔 500 毫秒
• 伺服器端初始值:長於 10 秒的刷新間隔可預渲染數據
• 跨來源 API 代理:可選的伺服器端代理繞過瀏覽器 CORS 限制
• 內建示範 API:附帶六個可立即使用的 REST API 端點

外掛標籤

開發者團隊

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

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

原文外掛簡介

Live Data Display is a powerful WordPress plugin that loads JSON feeds via HTTP and displays live-updating values on your site — with no page reload required.
Perfect for live tickers, stock prices, sports results, weather data, sensor readings, and any other real-time data source.
Key Features:

Multiple independent slots: Configure as many data slots as you need, each with its own API URL, refresh interval, and display target.
Shortcode and Gutenberg block: Place data anywhere with [araa slot="slot_1"] or the built-in block.
Auto-refresh: Each slot refreshes independently at a configurable interval (minimum 500 ms).
Server-side initial value: For slots with a refresh interval ≥ 10 s the initial value is pre-rendered server-side and cached, so visitors see data immediately — no flash of empty content.
Proxy for cross-origin APIs: Optional server-side proxy (admin-ajax or REST API) fetches external URLs from the server, bypassing browser CORS restrictions.
Customisable GET parameters: Use #GET_key# placeholders in the API URL to pass the current page’s GET parameters to the remote API.
Prefix / Suffix: Wrap every displayed value with configurable text (e.g. currency symbol, unit).
Error text: Show a custom fallback message when the API request fails or the JSON path is not found.
Page-visibility aware: Slots pause polling while the browser tab is hidden and resume immediately when it becomes visible again.
Active / Inactive toggle: Enable or disable individual slots without deleting their configuration.
Built-in demo APIs: The plugin ships with six ready-to-use REST API endpoints that can serve as live data sources straight away — no external service needed. Each endpoint must be individually enabled under Settings → Live Data Display → API:

/wp-json/araa/v1/api/time — current server time, date, weekday, and timezone
/wp-json/araa/v1/api/countdown — seconds/days until a target date (?to=YYYY-MM-DD; defaults to next New Year)
/wp-json/araa/v1/api/random — random integer within a configurable range (?min=1&max=100)

Clean uninstall: All plugin data is removed on deletion (optional: keep settings).

How It Works:

Add a slot: Go to Settings → Live Data Display and create a slot.
Enter the API URL: Paste the JSON feed URL. Use #GET_key# for dynamic GET parameters.
Set the JSON path: Enter the dot-separated path to the value you need (e.g. items.0.score).
Choose a proxy method (only needed for external/cross-origin URLs): admin-ajax or REST API proxy.
Set the refresh interval: How often (in milliseconds) should the value be updated?
Place the output: Use the shortcode [araa slot="slot_1"], the Gutenberg block, or a custom CSS/jQuery selector.
Optional: Add prefix, suffix, placeholder, error text, and an initial-hide selector.
Optional — enable REST API: To expose slot values via the plugin’s own REST API endpoints, go to Settings → Live Data Display → API and activate the feature. The endpoints are disabled by default.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon