[WordPress] 外掛分享: Soccr

首頁外掛目錄 › Soccr
WordPress 外掛 Soccr 的封面圖片
10+
安裝啟用
★★★★★
5/5 分(1 則評價)
17 天前
最後更新
問題解決
WordPress 7.0+ PHP 8.4+ v2.0.7 上架:2010-10-27

內容簡介

Soccr 外掛將 OpenLigaDB 的即時足球數據整合至 WordPress 的區塊編輯器,提供三個可完全配置的 Gutenberg 區塊,顯示比賽結果、聯賽排名及特定球隊的比賽資訊,並具備伺服器端渲染和快取功能,以提升效能。

【主要功能】
• 提供三個現成的 Gutenberg 區塊
• 伺服器端渲染,前端無需 JavaScript
• 內建快取功能,數據可快取長達 24 小時
• 支援區塊對齊(左、中、右、寬、全)
• 可選擇自訂區塊標題
• 顯示球隊徽章,並具備快取功能

外掛標籤

開發者團隊

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

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

原文外掛簡介

Soccr integrates live football data from OpenLigaDB into the WordPress block editor. The plugin provides three fully configurable Gutenberg blocks for displaying match results, league standings, and team-specific match information — all server-side rendered and cached for performance.
Blocks
Standings
Displays a full league table for a selected league and season. The table shows position, team name, matches played, wins, draws, losses, goals, goal difference, and points. The league and season can be selected directly in the block inspector.
Matchday
Displays all matches for a specific matchday. Automatically shows the current matchday by default. Includes optional pagination to browse through all matchdays of a season. Matches are grouped by date and show kickoff times for upcoming games and final scores for finished ones.
Team Match
Displays a match for a specific team. Three display modes are available: current match (next upcoming or last finished), next match, or last match. Optionally shows team crests. The team can be selected from a list of all teams in the chosen league.
Supported Leagues
By default, the following leagues and competitions from OpenLigaDB are available:

1. Bundesliga (bl1)
2. Bundesliga (bl2)
3. Liga (bl3)
1. Frauen Bundesliga (fbl1)
2. Frauen Bundesliga (fbl2)
UEFA Champions League (ucl)
UEFA Europa League (uel)
UEFA Conference League (uecl)
DFB-Pokal (dfb)

Additional leagues can be added via the soccr_league_shortcuts filter — see the For Developers section for an example.
Features

Three ready-to-use Gutenberg blocks
Server-side rendering — no JavaScript required on the frontend
Built-in caching (1 hour for match and standings data, up to 24 hours for teams, leagues, and crests)
Alignment support (left, center, right, wide, full) for all blocks
Optional custom block title for each block
Team crest display with built-in image proxy and caching
Pagination for matchday browsing

Data Attribution
All data is provided by OpenLigaDB under the Open Database License (ODbL) v1.0. Each block automatically displays the required attribution notice.
By using this plugin, your WordPress site will make requests to https://api.openligadb.de. No personal user data is transmitted to OpenLigaDB.
For Developers
Available filters:

soccr_league_shortcuts — Customize which leagues are available in the block inspector (default: ['bl1', 'bl2', 'bl3', 'fbl1', 'fbl2', 'ucl', 'uel', 'uecl', 'dfb'])
soccr_team_match_html — Modify the Team Match block HTML output
soccr_group_matches_html — Modify the Matchday block HTML output
soccr_group_matches_headline — Modify the Matchday block headline text
soccr_team_icon_url — Modify the team crest URL before it is proxied
soccr_league_season_display — Modify how the season is displayed alongside the league name (default: 2025/2026)

Example — adding leagues via soccr_league_shortcuts. Use any shortcut available on OpenLigaDB:
add_filter('soccr_league_shortcuts', static function (array $shortcuts): array {
$shortcuts[] = 'uefaeuro2024'; // UEFA Euro 2024
$shortcuts[] = 'wm2022'; // FIFA World Cup 2022
return $shortcuts;
});

Available actions:

soccr_exception — Triggered on API or rendering errors; use for custom error logging

延伸相關外掛

文章
Filter
Mastodon