বৰ্ণনা
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,frorit).{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,frorit. Invalid values fall back tode. Defaultde.months— number of months to display (integer, minimum 1). Default12.width— CSS width, e.g.100%or800. Default100%.height— CSS height, e.g.600or75vh. Default600.
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/<block-name>/ 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.
ব্লকবোৰ
এই প্লাগিনটোৱে 1টা ব্লক প্ৰদান কৰে।
- Calendar Embed a calendar as an iframe by its ID.
ইনষ্টলেশ্যন
- Upload the plugin folder to
/wp-content/plugins/pfadiheime/, or install the
zip via Plugins Add New Upload Plugin. - Activate “Pfadiheime” through the Plugins screen in WordPress.
- Add the “Calendar” block to a page, or use the
[pfadiheime_calendar]
shortcode. - Optionally set the
PFADIHEIME_CALENDAR_TEMPLATE_URLenvironment variable to
override the default calendar URL template (see Configuration).
পৰ্য্যালোচনা
এই প্লাগিনৰ বাবে কোনো পৰ্য্যালোচনা নাই।
অৱদানকাৰী আৰু বিকাশকাৰীসকল
“Pfadiheime” হৈছে মুক্ত উৎসৰ ছফ্টৱেৰ। এইসকল লোকে এই প্লাগিনত অৱদান আগবঢ়াইছে।
অৱদানকাৰীসকলআপোনাৰ ভাষাত “Pfadiheime” অনুবাদ কৰক।
বিকাশৰ প্ৰতি আগ্ৰহী?
ক’ড ব্ৰাউজ কৰক, SVN ৰিপজিটৰী চাওক নাইবা RSS-দ্বাৰা বিকাশৰ পঞ্জী ছাবস্ক্ৰাইব কৰক।
সলনি-পঞ্জী
1.0.0
- Initial release: Pfadiheime plugin with the “Calendar” block and shortcode.
1.0.1
- Tested with WordPress 7.0
1.0.2
- Fix automated review issues
1.0.3
- Add public repo url