[WordPress] 外掛分享: Pfadiheime

首頁外掛目錄 › Pfadiheime
全新外掛
安裝啟用
尚無評分
8 天前
最後更新
問題解決
WordPress 6.1+ PHP 7.4+ v1.0.4 上架:2026-08-01

內容簡介

Pfadiheime 外掛提供了 Gutenberg 區塊,用於嵌入 Pfadiheim-Verzeichnis 的日曆。使用者可以輕鬆地在網站上展示日曆,並自訂顯示的語言和月份數量。

【主要功能】
• 提供日曆區塊,支持嵌入 iframe
• 支援多語言選擇(德語、法語、義大利語)
• 可自訂顯示的月份數量和尺寸
• 透過短碼輕鬆插入日曆
• 開源代碼可在 GitHub 獲得

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.0.4) 或搜尋安裝

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

原文外掛簡介

This plugin provides Gutenberg blocks for the Pfadiheim-Verzeichnis. Each block
lives in its own folder under build/ and is auto-registered.
Calendar block
Embeds a calendar as an iframe. Each calendar is identified by an ID that is
inserted into a URL template. Place it with the “Calendar” block or the
[pfadiheime_calendar] shortcode, and set the locale, month count and iframe
size in the block sidebar (or as shortcode attributes).
Source Code
The source code for this plugin is publicly available at: https://github.com/diegosteiner/pfadiheime-wp-plugin/
Configuration
The URL template is read from the PFADIHEIME_CALENDAR_TEMPLATE_URL environment
variable. When unset, it defaults to:
https://pfadiheime.ch/{locale}/cottages/{id}/occupancies/calendar?months={months}

Placeholders replaced when building the iframe URL:

{id} — the calendar ID.
{locale} — the chosen locale (de, fr or it).
{months} — the number of months to display.

Calendar shortcode
[pfadiheime_calendar id="123" locale="de" months="12" width="100%" height="600"]

id — the calendar ID (required).
locale — de, fr or it. Invalid values fall back to de. Default de.
months — number of months to display (integer, minimum 1). Default 12.
width — CSS width, e.g. 100% or 800. Default 100%.
height — CSS height, e.g. 600 or 75vh. Default 600.

Build
The plugin uses the official WordPress scripts to build the minified javascript. Run npm build to
build what needs to be built into the dist/ folder.
Adding a new block
Create a folder under src// with its own block.json (and a
render.php for dynamic blocks). Run npm run build; the plugin auto-registers
every block found in build/. Note: build/ is generated (not committed), so
run npm install && npm run build after checkout.

文章
Filter
Mastodon