=== Dienstplan ===
Contributors: wpdienstplan
Tags: scheduling, shifts, roster, volunteers, calendar
Requires at least: 6.3
Tested up to: 7.0
Requires PHP: 8.1
Stable tag: 3.5.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Self-hosted shift rosters for volunteer teams — members sign themselves up, no SaaS, no monthly fee.

== Description ==

Dienstplan turns your WordPress site into a shift and duty roster that runs without a full-time coordinator.

It is built for teams that rely on volunteers — fire departments, emergency medical services, first-responder and crisis-response groups, sports clubs and associations. Members open a calendar page and sign up for open shifts themselves. Coordinators see at a glance which shifts are still open, who already volunteered, and who has not yet contributed this period. Every change is recorded, so "who removed me from Saturday?" always has an answer.

Everything runs on your own WordPress install. Member data, schedules and assignments stay in your database — no SaaS account, no recurring fee for the free version. The only optional outbound connection is the public-holiday lookup via openholidaysapi.org, disabled by default (see **External services**).

= What you can do =

* Define shift types (early/late/night, driver/paramedic — whatever your team uses) and build week or month rosters
* Drop the roster onto any page with the `[dienstplan]` shortcode
* Let members sign up for shifts and remove themselves again — coordinators see every change live, no email ping-pong
* Plan events like training nights, fundraisers or on-call duties with categories (per-event signup lists come with Basis)
* Show each member their own upcoming shifts in a dashboard widget
* Let members download their shifts as an ICS calendar file

= Why WordPress =

Most volunteer organisations already run a WordPress site for news and member communication. Adding the roster there means members use the account they already have, your data stays in your own database, and there is no external SaaS to vet for data protection.

= Free, Basis and Pro =

The version on WordPress.org is **Free** and stays free forever: one shift schedule, unlimited members, shift types and events — no artificial caps.

Two optional add-ons extend the same plugin in place, with your data carrying over automatically:

* **Basis** — multiple rosters, recurring events, per-event signups and tasks, shift trading, group and weekday restrictions, automated email notifications, and a community feedback channel. For established teams that need self-service workflows.
* **Pro** — everything in Basis plus attendance statistics, a tamper-evident audit log and waiting-list promotion on full events. For organisations with reporting or audit obligations.

Pricing and the full comparison are at [wp-dienstplan.de](https://www.wp-dienstplan.de).

= Languages =

Ships with English, German, Spanish, French and Italian. Source strings are English; further languages can be added via standard `.po`/`.mo` files in `languages/`.

== Installation ==

= From WordPress.org (recommended) =

1. Go to **Plugins → Add New** and search for "Dienstplan".
2. Click **Install Now**, then **Activate**.
3. Open the new **Dienstplan** entry in the admin sidebar to start configuring.

= From a ZIP file =

1. Download the latest ZIP from this plugin page or your account at wp-dienstplan.de.
2. Go to **Plugins → Add New → Upload Plugin**, upload the ZIP, then **Activate**.

= First steps =

1. Open **Dienstplan → Overview** for a guided setup of shift types and event categories.
2. Place the `[dienstplan]` shortcode on the page where members should see the calendar.
3. Optionally configure public holidays under **Dienstplan → Settings → Holidays**.

== Frequently Asked Questions ==

= What does my hosting need? =

Standard shared hosting. Required: WordPress 6.3+ and PHP 8.1+. No special server modules and no cron daemon (WordPress's built-in cron is used). The only optional outbound call is the holiday lookup (see **External services**).

= Where is member data stored? =

Exclusively in your own WordPress database, on your own server. The plugin sends no member data to us or any third party. If you enable public holidays, it fetches holiday dates from openholidaysapi.org — configuration values only (see **External services**).

= Can I show the roster on a public page? =

Yes. Use the `[dienstplan]` shortcode on any page or post. Optional parameters scope the calendar, e.g. `[dienstplan year="2026" shift_type_id="5"]` — see the in-admin help for the full reference.

= How does shift signup work? =

Members log into your site, open the calendar page and click an open shift to sign up. They can remove themselves again, and the change is recorded. Coordinators see the live state on the same page and in the admin overview.

= Multiple shift types or rosters? =

Free includes one schedule with unlimited shift types and events. Basis and Pro add multiple rosters, group restrictions, recurring events, per-event signups, statistics and an audit log.

= Will my data survive a switch between Free, Basis and Pro? =

Yes. The add-on uses the same database tables — activating it only unlocks features, it migrates nothing. Deactivating hides premium screens; your data stays in place.

= How do I suggest features or report bugs? =

The **Improve plugin** screen in the admin (Basis and Pro) lets you submit ideas, report bugs, vote and see what's in progress. Without a license, use the WordPress.org support forum for this plugin.

= Where can I get support? =

For the free version, use the WordPress.org support forum linked from this page. Basis and Pro customers can also email info@wp-dienstplan.de with their license key.

== Screenshots ==

1. The interactive calendar on a public page — members see upcoming shifts and sign up with one click.
2. The admin shift planner — assign members to shifts, with an at-a-glance view of who is signed up where.
3. The events list — plan training nights, fundraisers and on-call duties with categories (per-event signup lists with Basis).
4. The "My shifts" dashboard widget — every member sees their own upcoming commitments at login.
5. The plan comparison — which features are in Free, Basis and Pro.

== Changelog ==

= 3.5.1 — 2026-06-25 =

Documentation-only update: condensed wp.org readme, plugin header description aligned with the new short tagline, German GlotPress reference docs refreshed. No code changes.

= 3.5.0 — 2026-06-15 =

Focus on the shift planner and calendar readability. No breaking changes.

* Shift planner redesigned as a master-detail view: plans in a resizable sidebar on the left, shifts on the right
* Shifts can be reordered by drag & drop; consistent active/inactive toggling across all admin tables
* Shift colours now shown directly in the month view
* Clearer plan comparison with separate ICS tiers and a new "Multiple rosters" row
* Renamed UI term "shift type" to "shift"
* Updated translations (DE/DE-formal/ES/FR/IT)

= 3.4.0–3.4.2 — June 2026 =

* wp.org compliance: free is a fully functional single-schedule roster with no trialware patterns; multi-plan, weekday restrictions, event sign-ups/recurrences and audit log moved to the Premium add-on
* Restored the "My shifts" dashboard widget
* Hardened sanitization for shift-type/event saves and holiday settings
* Clarified that openholidaysapi.org is the only optional external service (disabled by default)

= 3.3.0 — 2026-06-01 =

* wp.org compliance: removed all quantity limits (members, plans, shift types, groups, events) from the free plugin
* Groups moved entirely to the Premium add-on, including tables and access-control logic; free exposes extension hooks only
* Simplified event creation dialog and clearer plan comparison

= 3.2.0–3.2.2 — May 2026 =

First releases prepared for the official WordPress.org directory, addressing the plugin-review team's feedback. No feature changes — output hardening and naming only.

* Unified plugin prefix `dienstplan_` across all AJAX actions, nonces, options, transients, cron hooks, asset handles and CSS classes
* Output escaping hardened throughout (`wp_kses()` for SVG icons, `esc_attr()` in attributes, defensive filtering of inline styles)
* Renamed shortcode `[termine]` to `[dienstplan_termine]`
* Documented the openholidaysapi.org integration under **External services**

= 3.1.0 — 2026-04-30 =

Preparation for the first WordPress.org release (not shipped publicly; see 3.2.0).

* Fully English source strings with DE/ES/FR/IT localisations
* Public hook API (`dienstplan_*` filters and actions) for clean extension — reference in `docs/hooks-reference.md`
* Tier structure (Free / Basis / Pro) documented

== Upgrade Notice ==

= 3.5.1 =
Documentation-only update: clearer, shorter wp.org plugin page text. Safe to skip if you are already on 3.5.0.

= 3.5.0 =
New master-detail shift planner with a resizable plan sidebar, drag-and-drop sorting, shift colours in the month view and a clearer plan comparison. Recommended for all users. Update Premium to 1.5.0 at the same time if you use it.

= 3.4.0 =
wp.org compliance release: free is a single fully functional schedule; multi-plan, weekday restrictions, event sign-ups/recurrences and audit log require the Premium add-on. Update Premium to 1.4.0 if you use it.

= 3.3.0 =
wp.org compliance release: the free tier is no longer capped by artificial limits; groups require the Premium add-on. Update Premium to 1.3.0 if you use it.

= 3.2.0 =
Reviewer-compliant rename: all internal IDs now use the `dienstplan_` prefix. Database schemas stay; options keys move to the new prefix.

= 3.1.0 =
First public WordPress.org release. If you previously ran the plugin from wp-dienstplan.de, your data, rosters and settings carry over with no migration step.

== External services ==

This plugin connects to the public OpenHolidays API (`https://openholidaysapi.org`) to retrieve official public-holiday dates for the country and (optional) region configured under **Dienstplan → Settings → Holidays**. The dates are stored in your own WordPress options and shown as background highlights on the calendar so members can see at a glance which days are public holidays. The feature is fully optional — clearing the holiday country in settings disables every outbound call.

It sends a request to `https://openholidaysapi.org` in three situations:

* `GET /Countries` — once, when the admin opens the holiday-settings page and the country list has not been cached yet. No payload, only an HTTP request.
* `GET /Subdivisions?countryIsoCode=XX` — once per country, when the admin selects a country in the settings UI to populate the region dropdown. The configured country code is transmitted as a query parameter.
* `GET /PublicHolidays?countryIsoCode=XX&languageIsoCode=YY&validFrom=YYYY-01-01&validTo=YYYY-12-31[&subdivisionCode=ZZZZ]` — once per year via WordPress cron, plus on demand when the admin triggers a manual refresh from the settings page. The configured country code, region code (if any), language code and requested year are sent as query parameters.

In every case, **only configuration values entered by the administrator are transmitted** (country / region / language / year). No member names, email addresses, shift data or audit-log entries are sent.

This service is provided by STÜBER SYSTEMS GmbH as an Open Data project: [terms of use](https://www.stueber.de/en/legal/imprint.php), [privacy policy](https://www.stueber.de/en/legal/privacy.php). Project documentation and the data-source overview are available at [https://www.openholidaysapi.org](https://www.openholidaysapi.org).

== Privacy ==

Dienstplan is built so that all member-related data — names, email addresses (from the WordPress user account), shift assignments, signup history, audit-log entries — stays exclusively in your own WordPress database. The free plugin makes no outbound HTTP requests other than the OpenHolidays calls documented in **External services** above.

= If you use the optional Basis or Pro add-on =

The commercial add-on contacts a separate license server at `lizenz.wp-dienstplan.de` for license activation and a daily license-status check. The data transmitted is limited to the license key, your site URL, and a status flag — no member data, no shift data and no email addresses are sent. License-server activity is logged with industry-standard webserver logs (IP, timestamp, user agent) for fraud prevention; the privacy policy at [wp-dienstplan.de](https://www.wp-dienstplan.de) documents this in detail. The license server is **not** active in the free plugin distributed via WordPress.org.

= Cookies and trackers =

Dienstplan sets no cookies of its own and uses no third-party trackers. The plugin relies on WordPress's standard authentication cookies for member login and on `localStorage` for remembering the last selected roster on multi-roster pages.
