=== WP Club Elements ===
Contributors: dietechnikbude
Tags: club, sports club, association, events, courses
Requires at least: 7.0
Tested up to: 7.1
Requires PHP: 8.2
Stable tag: 1.6.1
License: GPLv3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Content for club websites: departments, people, courses, events, locations, downloads and fees as post types, fields and blocks.

== Description ==

WP Club Elements gives a club website a data model and the blocks to show it. Editors maintain departments, people, courses, events, locations, downloads and membership fees in the WordPress admin; the plugin renders them with blocks that work in any block theme.

What it ships:

* Custom post types for departments, people, labels and partners, locations, courses, events, downloads and membership fees, with taxonomies for roles, types and categories.
* Structured fields per entry: contact details, addresses, opening hours, recurring schedules, event dates, venues, rooms, documents, galleries and relations between entries. After saving, the plugin checks an entry and says what a page will not show and why.
* Club data on one settings page: name, logo, address, contact details, bank details, opening hours, legal notice, a main button, and the data search engines read. Club blocks and block bindings show them anywhere.
* The kind of club (sports club, fire brigade, music club, social organisation, other): the words of the back end and the website follow it (duties, rehearsals, offers instead of courses), and so does the type search engines are told.
* One list block for every content type with layouts, grouping and filters, plus single and overview page templates per content type that work on any block theme.
* A map block that asks before it loads anything, a notice block, a timeline, one field block per field type, and blocks for downloads, collapsible sections and membership fees.
* Patterns and fallback templates, so entries look right on any block theme; a theme can override them.
* A registration API for add-ons that bring their own content types.

The plugin is theme-independent. The WPCE Theme is an optional companion built for it.

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/` or install the ZIP through Plugins → Add New.
2. Activate the plugin.
3. Enter your club's data under WP Club Elements → Club Data.
4. Add departments, people, courses and events, then place the blocks or patterns on your pages.

== Frequently Asked Questions ==

= Does it require a specific theme? =

No. Every block works with any block theme. The WPCE Theme adds templates and patterns tuned for club sites.

= Where do updates come from? =

Installations from Die Technikbude read updates from updates.die-technikbude.de; installations from the WordPress plugin directory update from there.

== External services ==

The plugin can contact two external services. By default both are run by the OpenStreetMap Foundation. A visitor's browser never contacts either of them before the visitor has allowed it.

= Address search (Nominatim) =

In the admin, an address field has a "Search address" button. When an editor presses it, the editor's browser sends the typed address to `https://nominatim.openstreetmap.org` to find the full address and its position for the map. Nothing is sent while typing, and never from the public website.

Service: Nominatim, OpenStreetMap Foundation. [Usage policy](https://operations.osmfoundation.org/policies/nominatim/), [privacy policy](https://osmfoundation.org/wiki/Privacy_Policy).

= Map tiles =

The map block draws its map from tiles (small map pictures). The default source is `https://tile.openstreetmap.org`; the site owner can enter another tile server under WP Club Elements → Settings, section "Map".

* After a visitor chose "Load map" (or allowed external media in a connected consent banner, or if the site owner switched on "Load maps without asking"), the visitor's browser loads the tiles from the tile server. The tile server receives the visitor's IP address, the requested map section and the address of the page.
* For the preview picture shown before that, the website's own server fetches the tiles around a location (at most twelve) once per location, zoom level and tile source, and stores the composed picture under `wp-content/uploads/wpce/maps/`. The tile server receives the server's IP address and a User-Agent with the plugin's name and the website's address; nothing about visitors. This can be switched off in the same settings ("Show a preview picture before the map loads").

Service: OpenStreetMap tile server, OpenStreetMap Foundation. [Tile usage policy](https://operations.osmfoundation.org/policies/tiles/), [privacy policy](https://osmfoundation.org/wiki/Privacy_Policy). The map itself is drawn with Leaflet, which ships with the plugin and is not loaded from elsewhere.

= Route links =

"Plan a route" is an ordinary link to Google Maps (Apple Maps on Apple devices) with the destination in its address. Nothing is sent until a visitor follows the link. [Google Maps terms](https://www.google.com/intl/en/help/terms_maps/), [Google privacy policy](https://policies.google.com/privacy), [Apple privacy policy](https://www.apple.com/legal/privacy/).

== Credits ==

The QR code on the printed notice of the wanted ads is drawn by uqr 0.1.3 (https://github.com/unjs/uqr, by Anthony Fu and contributors, based on the QR Code generator library by Project Nayuki). It ships with the plugin and runs in the visitor's browser only when the notice is printed. License: MIT. Copyright (c) Project Nayuki; Copyright (c) 2023 Anthony Fu <https://github.com/antfu>. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files, to deal in the software without restriction, subject to the copyright notice and this permission notice being included in all copies. The software is provided "as is", without warranty of any kind.

The department symbols were generated with Claude (Anthropic) for this plugin and are released under the plugin's licence (GPLv3 or later). They were not checked for similarity to existing icon sets.

== Changelog ==

= 1.6.1 =

* Courses: the facts box on a course page names the trainers of a training time on the line of that time, as the weekly plan already did. A time without trainers of its own is unchanged.

= 1.6.0 =

* Wanted ads are open. Under the new menu "Wanted ads" the club says what it is looking for: a coach, helpers for the summer party, a room, material. Each ad has a kind, a title, a short line ("In short"), the time it takes, "Who is it for?" (the whole club, a department or a course), a date until which it is shown, and a way to answer: a person of the club, or a name, email address and phone number written by hand. The form asks these questions in the four boxes of WordPress, with a preview and the answer to "Will it be shown? Why not?". "Found" ends an ad at once; an ad without an end date needs the explicit choice "Without an end date". The address word is `wir-suchen` for German sites and `wanted` otherwise (settings, tab Website); migration 23 stores it on sites that update, and takes `suchanzeigen` (`wanted-ads`) where a page with sub-pages already has the word.
* Who may do what: editors and administrators everything; authors and contributors submit; a department lead (also as a property of the user) writes ads for their own departments and courses and submits the rest. A published ad of a department can be changed by its lead, an ad for the whole club only by the editors. An ad that is submitted waits until the editors approve exactly what they saw. "Please check" and the dashboard name ads that will not show or whose text holds a phone number or an email address.
* Every ad has its own page, with the block "Wanted ad" (`wpce/wanted-ad`) and patterns for the single page and for an overview. The list block (`wpce/entries`) has a new content type "Wanted ads" with a card variant and bands by kind; new setting "Page for wanted ads" (tab Website). Ended ads say "This search has ended." on their own page and are in no list and in no search. Behind a page cache the action `wpce_wanted_ads_changed` fires when an ad starts, ends or changes.
* Notice for the wall: the button "Print as a notice" prints one ad, or all running ones from the overview, on A4 in the browser (or as a PDF), with a QR code of the address of the ad (drawn in the browser by uqr, MIT). In the overview, the switch "Print contact (phone, email address)" (off at each print) adds the contact to the paper. New block attributes `printButton` and `printContact`.
* Contact details and privacy: an ad shows the contact of a chosen person only as far as the setting "Contact details of people on the website" and the ticks of that person allow. The tools of WordPress for personal data (export and erase) find ads by email address and clear the contact of an ad without deleting the ad. The search of the list in the admin finds names, phone numbers and email addresses; an ad that has ended for more than six months and still holds contact details is named in "Please check" for deletion.
* People: the ticks "The email address may be shown on the website" and "The phone number may be shown on the website" appear only where the person has an email line or a phone, fax or WhatsApp line.
* Announcements: the form starts with "What is it about?" in the box "Content" ("Cancelled" without a detour), and the pop-up can now open for Info announcements as well.
* For themes: new classes in the public contract: `.wpce-wanted-ad__print-button`, `.wpce-entries__print`, `.wpce-entries__print-button`, `.wpce-entries__print-contact`. For developers: the filter `wpce_wanted_ads_released` closes the type, the action `wpce_wanted_ads_changed` (see above); migration 23.
* Data migrations run by themselves on the first page load after the update.

= 1.5.0 =

* Department lead as a property: a user with the role Contributor, Author or Editor can be marked as lead of one or more departments ("Leads the departments" in the profile; the list of users has a column and a view for it). The property adds the rights of a department lead to the normal role; the role "Department lead" stays as it is. It works from the role Contributor upwards; subscribers only get a hint. The switch "User roles" now also switches the property off (renamed "Department lead and user roles"; filter `wpce_lead_property`).
* Announcements for the whole club: department leads may now publish announcements for the whole club and for locations, and change their own. A new announcement starts with "Everywhere"; whoever may not publish it submits it for review. A new course that a lead also assigns to a foreign department goes to review.
* The form of announcements has four boxes (what, where, when, how important) with "Everywhere" as the starting value and one shared state.
* People: a department lead edits the people of their own departments and sees all published people in the list (view "My departments"). A person can be locked against department leads, and the editorial team gets a notice when a lead changes a person. The update locks once the people who belong to no department (no home department and not linked with exactly one tree of departments; migration 22); a notice after the update offers "View the list" and "Lift the lock for all of them".
* Data migrations run by themselves on the first page load after the update.

= 1.4.2 =

* Fix: department leads can now choose people of other departments and all locations in the pickers of courses, events and departments.

= 1.4.1 =

* Contact details of people: new setting "Contact details of people on the website" (WP Club Elements, tab Website, section Privacy) with a line each for email addresses and phone numbers - never, only for people who are ticked, or always - and a tick for each person in the box "Contact information" ("The email address may be shown on the website", "The phone number may be shown on the website"). The setting applies to the website and to the REST API alike. Websites that already show contact details of people keep "always"; all others start with "only for people who are ticked". In the list of people, mass actions tick or untick many people at once. A website that has not been migrated yet keeps showing what it showed until the first request after the update has run.
* Email links of the plugin are now encoded in the link itself, as they already were in the text.
* For developers: the class `WPCE\Plugin\Privacy\PersonContacts` (`shows()`, `filter()`) answers whether the website shows the email address or the phone number of a person; the option is `wpce_person_contacts` (`array( 'email' => …, 'phone' => … )`, each `never`, `approved` or `always`); migration 21.

= 1.4.0 =

* Announcements are open. Under the new menu "Announcements" you write short news of the club - a cancelled course, a closed office, the summer party: for whom (the whole club, departments, courses, locations or events), from when to when, how important (Info, Important, Warning, Cancelled), a short text and a link. The website shows it at the right places and takes it down by itself; an announcement has no page of its own. The form asks these questions one after another, with a preview of where and when it will show. The list shows the state of each one (Running now, Planned, Expired, Waiting for approval, Shows nowhere, Draft), "Please check" names the ones that show nowhere and why, and "Copy as a new announcement" starts the next one from an old one.
* Who may do what: editors and administrators everything; authors publish their own for departments, courses and events and submit them for the whole club and for locations; contributors submit; subscribers nothing. The roles of WordPress (administrator, editor, author, contributor) get these rights on the first request after the update, without a migration; what an administrator changes on a role afterwards stays. Roles of other plugins and copies of a role get nothing: give them the rights with a role editor. New role "Announcements" (`wpce_announcer`) for a club office or a press officer: every announcement and nothing else (no posts, no media; do not combine it with Author or Contributor). Department leads write announcements for their departments, their courses and events and submit the rest. Whoever may not publish for the whole club can have at most 50 running or planned at a time (filter `wpce_announcements_max_per_author`); the 51st goes to review. Like the department lead, the role "Announcements" exists while the switch "User roles" is on, and on a network only with the filter `wpce_core_roles_on_multisite`.
* New block "Announcements" (`wpce/announcements`), the band: in a block theme it hangs in by itself as the first block of the template part "Header", so running announcements for the whole club stand at the top of every page. A theme without such a part (a classic theme) gets no band by itself: insert the block where it belongs. Switch it off with "Show announcements at the top of every page" (WP Club Elements, tab Website; the filter `wpce_announcements_hook_band` has the last word). A theme that places the block in its own header gets no second one. A block theme that draws the band in a template part of its own in front of a fixed header announces it with `add_theme_support( 'wpce-announcement-slot' )` (the value may name the part; default `announcements`): the plugin's page templates then get that part, and the band is not hung into the header any more. The function `wpce_announcements_band_enabled()` tells such a theme whether to draw it. The single pages of courses, departments, locations and events show the announcements meant for them under their head; a template saved in the site editor keeps its own and can add the block. Each stage has an icon, a weight and a word that screen readers read too; a visitor can close an announcement for the session (`sessionStorage`, never a cookie).
* Pop-up: an Important or Warning announcement for the whole club can also open as a pop-up - in addition to the band, never instead of it, at most one per page. An Important one opens once per visitor, a Warning once per browser tab; the browser remembers it only when the visitor closes it or follows its link (`localStorage` or `sessionStorage`, never a cookie). It waits for a consent banner and never shows on the legal notice, the privacy policy or in the editor. Only whoever may publish for the whole club and has the new right `wpce_announcement_popups` publishes a pop-up: editors, administrators, and the role "Announcements" while its switch under "Website › Pop-ups" is on; everybody else's goes to review as a band. New section "Pop-ups" (WP Club Elements, tab Website): that switch and the pages on which a pop-up never appears (the filter `wpce_announcement_popup_excluded` can add pages, not take any away).
* Course lists, tables, cards and the course loop show "Cancelled on Thu, Nov 12" at a course when a running cancellation names it, at most 14 days ahead; switch it off per list block.
* New list "News" in the list block (`wpce/entries`, content type announcements): the running announcements as rows, the highest stage first. New setting "Page for announcements" (tab Website): the band links "All announcements" to it, and a list "News" on that page shows every running announcement.
* New RSS feed: `/feed/meldungen/` (the whole club, at most 20) and `/feed/meldungen/?abteilung=<slug>` (one department, the departments below it, their courses and events). Once the address works, the head of every page names it (switch "Offer the feed of announcements to feed readers", filter `wpce_announcements_feed_link`). After the update the address works once the admin has been opened (the rewrite rules are rebuilt then; on a network the admin of each website) or the permalink settings are saved. A page called "Meldungen" keeps its address.
* Announcements start and end by themselves: WP-Cron events at their start and end fire `wpce_announcements_changed` (`$id`, `$reach`), so a caching plugin or a snippet can empty its cache; a real server cron is better than WP-Cron. Behind a page cache a tiny inline script (under 1 KB, with the nonce of a strict content security policy) hides what has ended; where it cannot run, an ended announcement stands until the cache is renewed. Deactivating or deleting the plugin removes the events (on a network: deactivating it network-wide or deleting it removes them on every website); deleting it also removes the rights of announcements from every role.
* For themes: `.wpce-announcements`, `.wpce-announcement`, `.wpce-announcement__title`, `.wpce-announcement__period`, `.wpce-announcements__more`, `.wpce-announcement-popup`, `.wpce-announcement-popup__title`, `.wpce-announcement-popup__close`, `.wpce-notice--warning`, `.wpce-notice--important`, `.wpce-notice--info`, `.wpce-notice--cancellation` and the token `--wpce-alert` are part of the public contract. For consent tools: an optional `window.wpceConsent.pending()` that returns true while the visitor has not decided keeps the pop-up waiting. For add-ons: the interface `TargetScope`, `RoleRegistry::scopes_for()` and the filter `wpce_announcements_page_url`. The filter `wpce_announcements_released` (false, in a must-use plugin) closes the announcements again as 1.3.0 shipped them: the roles lose their rights of announcements and the role "Announcements" goes at the next request, the announcements stay stored; opened again, the roles of WordPress get table I anew (also what an administrator had taken away by hand).
* Demo content: every demo club has running announcements (a cancelled course, a changed hall, a warning with an hour, a pop-up invitation, one shown ahead of time); the model club also gets a user with the role "Announcements". The seeder writes them as the user running it (`wp --user=<administrator>`; without one, or for a user who may not publish for the whole club, the first administrator writes them). On a multisite the demo user is only created with `WPCE_SEED_ANNOUNCER=1`.

= 1.3.0 =

* New block "Occupancy plan" (`wpce/location-plan`): who trains where and when, drawn from the training times of the courses of a location. A weekly plan on the screen, a list on the phone, and a landscape A4 sheet to print or save as PDF from the print dialog (a button under the plan opens it). It shows only what is public (published courses without a password) and never for a location behind a password. Options in the sidebar: which day or season it applies to, days or rooms side by side, coaches, departments, patterns for black-and-white print, heading level, a note.
* The printed sheet of the occupancy plan is a grid, also with many columns: a location with two halls from Monday to Friday and one on the weekend is one landscape A4 sheet. A room that is empty on a day takes no width there. Only a plan that needs more width than a sheet has (more than 16 units, a unit being a column or a group training side by side) is printed as a list for each day. "One plan per room" is chosen by "Automatic" only when the plan does not fit one sheet.
* New field "Colour on the occupancy plan" on a department: choose one of eight pale tones (or leave it to the plugin). The courses of the department are drawn on that colour, on the screen and on paper, the text stays black, and a key under the printed plan says which colour is which department. Bookings without a department are white. Departments of a plan get different colours by themselves (up to eight), and, as long as colours are free, a colour chosen on purpose is not given to another (with all eight tones chosen, a ninth department has to share one). Tall cells also name the department in a line of their own. The printed plan is flat and calm: pastel areas on white, the day headings in the colour of the club, faint half-hour lines, room names that never break inside a word. For a black-and-white printer, the option "Patterns for black-and-white print" (off by default) adds a faint pattern for each department.
* The page of a location has a new band "Occupancy plan" (small line "Who is there, and when") after "Courses at this place", with the days one heading level below the band; a location without training times has no band. Websites whose location template was changed in the site editor do not get the band by themselves: insert the block "Occupancy plan" into the template (without its own heading, level 3 under the heading of the section), or reset the template "Single location" to the plugin's version. Wording: `wpce_section_plan_kicker`, `…_heading` and `…_lead` of the labels of the location.
* "Please check" on a course: a training time without an end is a hint (allowed; the occupancy plan draws it as half an hour, marked "end open"), and an end that is no time of day ("20.00", "24:00") is a warning (shown as half an hour, marked "end unclear"). A migration (20) counts courses saved before this version once, so the dashboard names them on the first visit after the update.
* The public contract promises the classes `.wpce-location-plan` and `.wpce-location-plan__item`; the numbers the server writes (`--wpce-plan-*`) are plumbing and not promised. For developers: the filter `wpce_location_plan_slots` changes the entries of a plan.
* The occupancy plan is translated into German, including its name in the block inserter and its editor texts.
* Email links are checked more strictly; addresses with umlauts stay correct. A stored address that is not a valid address is shown as text without a link.

= 1.2.0 =

* New user role "Department lead": somebody looks after their own departments (and their subdepartments) without being an editor - the page of the department, its courses, events and people. They can change these and create new ones, which belong to their department; they cannot change other departments, pages, the club data, the settings or other users. The name follows the club's word for a department ("Group lead", "Area lead" ...).
* Administrators give the role under Users and choose the departments in the profile ("Looks after") or at the department ("Who looks after this department?"). Without a department the role can change no entry of the plugin; it keeps the basic rights of an author (upload media, add tags). "Looks after" shows only on the profile of a user with the role, or of one who still has departments from it.
* A department deleted for good (emptied from the trash) is taken out of every course, event and person that named it, whoever deletes it: a department created later with the same ID inherits nothing. A course can then be left without a department.
* A person has a "Home department": whoever looks after it may change the person. Standing in the list of people of a department is not enough. Only administrators set it; a person a department lead creates is at home in that department.
* The categories of a department can be changed only by administrators (who may assign departments); editors no longer change them, nor move a department that carries categories under another one. They decide where its lead writes news: a department lead writes posts in the categories ticked at their departments (subdepartments included; nothing is taken over from the department above), changes and trashes their own posts while they stand in such categories only, and never touches the posts of others; a post the editors also filed in another category (the club's news, say) the lead can still see but no longer change. A post without a category lands in the lead's first category, not in the default category; other categories are dropped. Without a department, or without a category at it, the role writes no posts. It does not create categories, does not make posts sticky and does not moderate comments (unless another role lets the user moderate), and comments waiting for approval are not listed to it; tags work as for an author.
* Department leads trash and restore courses and events of their own departments, never delete for good; departments and people do not go to the trash. Entries shared with another department they change, but do not trash, set back to draft or put behind a password. They see all media and change their own. They cannot use XML-RPC.
* Switch "User roles" under WP Club Elements: off, nobody holds the roles of the plugin any more; who had which role is kept and applies again when switched on. Deactivating the plugin takes the roles away until it is active again; deleting it removes the roles and the departments stored at the users.
* The departments of a user are stored per website. Over the REST API, administrators set the departments in the field `wpce_lead_sections` of another user (context `edit`); on a network that takes the right to edit the user, so in practice a super admin.
* Multisite networks: the department lead is off on a network. With the filter `wpce_core_roles_on_multisite` (return true; add it network-wide before `plugins_loaded`, for example in a must-use plugin) the role appears on every website of the network that runs the plugin and has departments while the switch "User roles" is on, with the boxes "Who looks after this department?" and "Home department". Activate the plugin network-wide as well: where it is not active, or where the filter is not set, code that switches to a website with leads (for example a plugin that copies content between websites) sees their role with the capabilities of an author, without the limits of their departments; the content types of the plugin stay closed there. Each website assigns its own departments: its administrators in the box at the department, super admins also in the profile and over the REST API; an administrator of one website changes nothing on another, and a lead of one website can do nothing on another. Super admins are never restricted. The switch "User roles" and deactivating apply per website; deactivating or deleting the plugin network-wide takes the role from every website.
* For developers: add-ons register roles of their own (`wpce_register_roles`, `RoleDefinition`, `Scope`, `TermScope`, `SectionMembership::register_link()`), see docs/ADDONS.md. New field types `ShortText` (bold, italic, links), `Date`, `Time` and `Toggle`.
* For developers: while a role is registered and the switch "User roles" is on (on a network: with the filter `wpce_core_roles_on_multisite` or a role of an add-on), the create capability of every content type that is created with `edit_posts` or `publish_posts` (posts, synced patterns, content types of other plugins with `capability_type` `post`) is called `wpce_create_<type>`, on every website, also where nobody has the role. `current_user_can()` and `user_can()` answer as before; code that asks a role directly (`get_role( 'editor' )->has_cap( $type->cap->create_posts )`) gets a no - use `user_can()` or `RoleRegistry::original_create_cap()` (null for a type that is not rewritten and while the switch is off: then `$type->cap->create_posts` applies). `/wp/v2/types?context=edit` reports the new name, and role plugins list `wpce_create_*` as capabilities of their own; giving or taking them changes nothing.
* The content type for announcements ships as the foundation of 1.3.0 and stays closed: no menu, no list and no entry under "+ New" for anybody, super admins of a network and users a role plugin gave its capabilities included.
* The notice block ends a period at the start of the next day also where a change of time skips midnight.
* Links in the text of the notice block lead to `http`, `https`, `mailto` and `tel` addresses or to pages of the website (a path with `/`, an anchor `#...` or a query `?...`). A link with any other target (for example `ftp:`, `sms:`, `webcal:`, `fax:`, `urn:` or a relative address without a leading `/` such as `kontakt.html`) is shown as plain text; the stored text stays as it is. Text that is not closed (an open link or bold) no longer reaches beyond the notice. The text is shown up to 10 KB, tags nest at most eight deep. "Open in new tab" keeps working. Of a stored `rel` the words `nofollow`, `sponsored` and `ugc` are kept; links to a new tab or another website always get `noopener noreferrer`.
* After an update, the dashboard and the screens of the plugin show once what is new in this version, to users who maintain plugin content (administrators and anybody who may edit a content type of the plugin). Closing it is stored per user and per site (user option `wpce_whats_new_seen`); a fresh install shows nothing (option `wpce_whats_new_since`). The filter `wpce_show_whats_new` switches it off, `wpce_whats_new_all_url` changes the link to all news. Nothing is loaded from elsewhere; deleting the plugin keeps both, like all its data.
* Content types no longer borrow the wording of posts. The admin bar showed "View Posts" on a list of courses (and "Beiträge anzeigen" in German); now it says "View Courses", in the words of the club's kind. The same goes for the headings and screen reader texts of the lists, the notices after saving ("Course published."), the archive heading and the link label. Applies to all content types including announcements; addresses, rights and visibility are unchanged. A filter on `wpce_post_type_labels` still has the last word, and any of these labels it leaves out follows from the name it sets.

= 1.1.2 =

* Entries behind a password keep their fields to themselves: the website, the lists, the field blocks, the map and the media of such an entry show nothing of it, and over REST `meta` is empty for everybody who may not edit the entry.
* Entries behind a password no longer hand out their featured image over REST: for users who may not edit the entry, `featured_media` is 0 and the response neither links nor embeds (`_embed`) the picture.
* Possible break for connectors: `_wpce_source` and `_wpce_external_id` can be read over REST only by users who may edit the entry and written only by administrators (`manage_options`). A connector that signs in as an editor gets 403 when it writes them; use an administrator account or `Identity::upsert()` in PHP.
* Upcoming events are ordered by their next day, not by a first day that is over; a limited list keeps entries without dates behind the dated ones.
* The same word, or a word WordPress keeps for itself (`feed`, `page`, `author`, `search` ...), cannot be saved for two kinds of content in the web address; the settings page says why.
* An IBAN or BIC with no-break spaces (pasted from a web page or a PDF) is accepted.
* The country in the address field is only a hint in the empty field; nothing is saved by accident.
* The check of the legal notice runs in the browser too: an empty "Represented by" shows under "Please check" right after saving.
* Data migrations reach entries in the trash and types that are not public (downloads, fees); migrations 18 and 19 catch up what earlier ones missed. The upgrade lock is atomic, `wp wpce upgrade` takes it too (`--force` for a stuck lock), and the migration log keeps the last 50 runs.
* An import that sends an entry again takes it out of the trash instead of creating a twin (filter `wpce_identity_restore_trashed` lets a deletion stand).
* Demo seeder: a reset or a seed only removes what carries the demo mark, and refuses to purge a production site.
* The update library (wp-dtb-updater) is now 1.2.0: updates are only fetched from the update server, and the notice about a new version shows once per request.

= 1.1.1 =

* The pills of the department bar wrap on phones instead of scrolling sideways.
* The selected chip or pill is readable in themes without a "primary" palette colour.
* Five department symbols redrawn: trophy, stopwatch, competition, shot put and athletics.
* Credits for the department symbols in the readme.
* The demo profiles use department symbols.
* New setting for the order of the sections on a person page (Settings -> Website -> Pages).
* New option on cards and list rows: limit the labels to a number, the rest shows as "+ N".
* More end-to-end tests.

= 1.1.0 =

* Departments can show a club symbol instead of a logo: 36 symbols for sports, club life and places, chosen in the department with "Choose symbol". The symbol appears on the card, in the page head and in the admin list, in the colours of the website. The symbols were generated with Claude (Anthropic) for this plugin and are not checked for similarity to existing icon sets.
* Membership fees have a new field "Collection": 5 EUR monthly, collected every quarter shows as "5,00 EUR / month" with "collected quarterly" below. Nothing is calculated, and without the field nothing changes.
* A person who carries a role and the role below it ("Trainer" and "Trainer Rehasport") shows only the more specific one in the page head, cards, lists and tables. Grouping, filters and search work as before.
* New option on the list block: on a list filtered by a role, show only the labels within the filter.
* The title of the overview page of a content type can be changed in the page head block (panel "Overview").
* A weekly plan with several weekdays or places has chips to filter it by weekday and place (needs JavaScript; without it the whole plan shows).
* Logos in the list of partners and sponsors are no longer cut off.
* Demo clubs: the sports club and the fire brigade show sub-menus in the header.
* German translation.

= 1.0.0 =

* First stable release. It replaces the pre-releases 0.1.0-rc.1 and 0.1.0-rc.2.
* One list block for all content types, with single and overview page templates per content type.
* Club data on one settings page, including the legal notice, a main button and the structured data for search engines; the type follows the kind of club.
* New setting "Kind of club": sports club, fire brigade, music club, social organisation or other club. The wording of the back end and the website follows it, and a club's own label filters still have the last word.
* The map block asks before it loads anything. The box "Remember my choice" is no longer ticked beforehand, and the website composes at most 20 preview pictures per day.
* Structured data is written safely inside its script element; files that run code when they are loaded stop a direct call.
* Entries are checked after saving; the dashboard and the lists say what a page will not show.
* Data migrations run by themselves on the first page load after the update.
* A new website in German starts with German addresses (/kurs/, /termin/, /abteilung/, /standort/, /sponsor/, /person/). Websites that already have data keep theirs, and a later change of the language changes no address.
* German translation.

= 0.1.0 =

* First packaged release: the plugin lives in its own repository and ships through updates.die-technikbude.de.
* Text domain renamed to `wp-club-elements`, block namespace to `wpce/` (was `wpce-plugin`). Existing content needs a one-time `wp search-replace 'wp:wpce-plugin/' 'wp:wpce/'`.
* Requires WordPress 7.0 and PHP 8.2.

== Upgrade Notice ==

= 1.6.0 =

Wanted ads are open: new menu "Wanted ads", own pages, notices to print with a QR code. Migration 23 stores the address word (`wir-suchen` in German, `wanted` else; `suchanzeigen` if a page already uses it). Check the addresses after the update.

= 1.5.0 =

Migration 22 locks people without a department against leads; lift the lock in the notice. The lock binds marked authors too. Leads can publish announcements for the whole club. Role renamed "Department lead (own departments only)". Emergency brake: filter `wpce_lead_property`.

= 1.4.2 =

Fix: department leads could not find people of other departments or any locations in the pickers of courses, events and departments. No settings to check; no migration.

= 1.4.1 =

New setting "Contact details of people on the website" (WP Club Elements, Website, Privacy). Websites that already show contact details keep showing them; all others start with "only for people who are ticked". Check the setting after the update.

= 1.4.0 =

Announcements are open: administrators, editors, authors and contributors get rights by their role, and the role "Announcements" is new. In block themes the band shows at the top of every page (switch under WP Club Elements). Open the admin of each website once so that /feed/meldungen/ works.

= 1.3.0 =

New block and band "Occupancy plan" on the page of a location. A location template changed in the site editor gets no band by itself: insert the block or reset the template. A migration counts training times with unreadable ends once.

= 1.2.0 =

New role "Department lead", assigned per website; nobody holds it until an administrator gives it. Notice links allow only http, https, mailto, tel and paths (/, #, ?). Only administrators change a department's categories. Network: needs the filter wpce_core_roles_on_multisite, plugin network-wide.

= 1.1.2 =

Connectors that write `_wpce_source` or `_wpce_external_id` over REST need an administrator account from this version on (an editor account gets 403). Entries behind a password no longer show their fields; equal or reserved words in the web address are refused.

= 1.0.0 =

Sites on a 0.x version are not offered 1.0.0: their update channel follows the major version. Install the 1.0.0 ZIP once by hand; updates then arrive on their own. Coming from 0.0.x? Run the search-replace described under 0.1.0 first.

= 0.1.0 =

The block namespace changed from wpce-plugin/ to wpce/. Run a one-time search-replace on existing content before updating from 0.0.x.
