=== Klangagenda Calendar ===
Contributors: klangagenda
Tags: calendar, agenda, google calendar, icloud, events
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 2.5.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Calendar plugin for embedding a Google, Apple/iCloud, Microsoft 365/Outlook or Konzertmeister calendar as an agenda list. Free from KlangAgenda.de.

== Description ==

Displays a calendar (Google Calendar, Apple Calendar/iCloud, Microsoft 365 /
Outlook Calendar, or Konzertmeister – via iCal/ICS link) as an agenda list,
in the style of "date box on the left, title/date/time/location/description
on the right". No click behavior (no modal, no redirect) – text remains
normally selectable/copyable.

Provided free of charge by [KlangAgenda.de](https://klangagenda.de) – on
Klangagenda.de you can promote your concerts free of charge across your
region, book rehearsal and concert venues, and offer your own space to
others to make better use of it.

All settings (including a detailed step-by-step guide for each calendar
provider) are available in the WordPress backend under the dedicated
top-level menu "Klangagenda Kalender" (with its own calendar icon).

= Shortcodes =

**[klangagenda]**
Shows all upcoming events (including recurring ones, e.g. weekly
rehearsals).

**[klangagenda_no_recurring]**
Shows upcoming events WITHOUT recurring events (e.g. only
concerts/special events, no weekly rehearsals).

**[klangagenda_konzerte]**
Shows only events whose title contains the word "Konzert" (German for
"concert", case-insensitive), e.g. "Winterkonzert", "Sommerkonzert",
"Adventskonzert". By default shows neither a date badge nor a
description per event – instead, the description of the first (next)
event is shown once at the top of the whole list.

By default, this shortcode shows no "Buy tickets" button per event.
The attribute `ticket_button="ja"` turns this on. `beschreibung="nein"`
hides the intro description at the top, and `badge="ja"` shows the date
badge per event:

`[klangagenda_konzerte ticket_button="ja" badge="ja" beschreibung="nein"]`

"(+)"/"(-)" markers (e.g. from Konzertmeister sync) are automatically
stripped from event titles in all shortcodes.

All shortcodes accept an optional `count` attribute, e.g.
`[klangagenda count="5"]`. If omitted, the default count from the
plugin settings is used.

= Fixed date window per post (ab / bis) =

Normally the shortcodes automatically show the next upcoming events
from now on. For the typical workflow (one post per concert
tour/period; once it's over the post moves into the archive and a new
post with the next dates is created), there are optional attributes
`ab` (from) and `bis` (until) (format YYYY-MM-DD):

`[klangagenda_konzerte ab="2026-09-01" bis="2026-09-14"]`

This makes this specific post permanently show exactly the events in
this time window – even once they're in the past. `ab` and `bis` can
also be used individually.

= "Load more" button =

[klangagenda] and [klangagenda_no_recurring] automatically show a
"Mehr Termine" (load more) button below the list whenever more events
are available beyond the currently shown count. Clicking it loads more
events via AJAX (no page reload). The button does not appear on the
[klangagenda_konzerte] shortcode and can additionally be hidden
explicitly via `[klangagenda button="nein"]`.

= "orchestriert von klangagenda.de" =

Below each event list (or below the "load more" button, if present),
a subtle, light-gray, centered note "orchestriert von klangagenda.de"
appears by default, linking to https://klangagenda.de. This note can
be fully switched on or off in the backend under "Klangagenda
Kalender".

= Recurring events (RRULE) =

RRULE processing covers the common patterns (daily/weekly/monthly/
yearly, interval, count, end date, weekdays). Recurring events without
an end date are pre-calculated up to the configured time horizon
(default 12 months), and continued automatically on the next sync.

= Ticket button =

The button appears when the title contains "konzert" and the
description contains an http(s) link. Only the first link found is
used.

== Installation ==

1. Upload the whole "klangagenda-calendar" folder to
   wp-content/plugins/, or install the plugin directly via Dashboard ->
   Plugins -> Add New.
2. Activate the plugin under "Plugins" in the WordPress dashboard.
3. In the backend menu "Klangagenda Kalender" (top level, own icon),
   enter your calendar's subscription link under "Kalenderlink
   einfügen". Google Calendar, Apple Calendar (iCloud), Microsoft 365 /
   Outlook Calendar, and Konzertmeister calendars are supported –
   both https:// and webcal:// links work directly. A detailed
   step-by-step guide for each provider is available in the
   "Anleitung" tab.
4. Save -> the plugin syncs immediately and then automatically every
   30 minutes via WP-Cron.
5. Insert one of the shortcodes (e.g. `[klangagenda]`) into a page or
   post.

== Frequently Asked Questions ==

= Does the plugin cost anything? =

No, the plugin is free and provided by KlangAgenda.de.

= Which calendars are supported? =

Any calendar that offers a public iCal/ICS subscription link: Google
Calendar, Apple Calendar (iCloud), Microsoft 365 / Outlook Calendar,
and Konzertmeister. Both https:// and webcal:// links are accepted
directly.

= How often are events updated? =

Automatically every 30 minutes via WP-Cron, plus immediately after
saving the settings or via the "Jetzt synchronisieren" button.

== Screenshots ==

1. Selectable calendar views
2. Dashboard
3. Calendar view 1
4. Calendar view 2
5. Calendar view 3
6. Calendar view 4

== Changelog ==

= 2.5.1 =
* Fix: increased spacing below the month heading (introduced in 2.5.0) so it
  no longer sits too close to the following event.

= 2.5.0 =
* The corner radius of the "Tickets kaufen" and "Mehr Termine" buttons is now
  configurable.
* Font size and color for the event title, date, location and description
  are now individually configurable in the backend.
* Optional month headings (e.g. "Oktober 2026") can now be shown between
  events whenever the month changes.

= 2.4.0 =
* The per-event description can now be shown or hidden, and its text color
  is configurable in the backend.
* When the description is hidden, each event becomes clickable and opens a
  popup with the full event details (title, date, location, description)
  instead - text selection/copying on the rest of the list is unaffected.
* The "Kalenderansicht" preview cards now also show the description color
  and the popup behavior live.

= 2.3.2 =
* Fix: after automatically (re-)creating the events table (see 2.3.1), the
  calendar is now also synchronized immediately, instead of waiting for the
  next scheduled sync (up to 30 minutes) or a manual click on "Jetzt
  synchronisieren".

= 2.3.1 =
* Fix: the events database table is now also created/repaired on every
  page load if missing, not only on plugin activation. This prevents
  "table doesn't exist" errors when the plugin is updated by overwriting
  its files (e.g. via FTP or a hosting file manager) instead of being
  deactivated/reactivated through the WordPress admin.

= 2.3.0 =
* Added three additional card-style calendar views (date on the right with
  an accent-colored left border, date on the left, and a full-height
  accent-colored date block) as alternatives to the standard date badge.
* New backend section "Kalenderansicht" under Settings to preview all
  available views live (using the currently configured colors, even before
  saving) and select the active one.
* New configurable card background color for the card-style views.

= 2.2.0 =
* Removed the legacy `[google_agenda]` / `[google_agenda_no_recurring]`
  / `[google_agenda_konzerte]` shortcode aliases introduced in 2.0.0;
  please switch any existing pages to `[klangagenda]` /
  `[klangagenda_no_recurring]` / `[klangagenda_konzerte]`.

= 2.1.0 =
* Prepared for release in the WordPress plugin directory (full plugin
  header, GPLv2 license, readme.txt in WordPress.org format, English
  readme, dropped "Plugin" from the plugin name).
* All internal identifiers (classes, functions, options, database
  table, asset handles, hooks) renamed to a distinctive `klanca_` /
  `KLANCA_` prefix; settings from the predecessor plugin are migrated
  automatically on activation.
* webcal:// links are stored/displayed unchanged and automatically
  switched to https:// internally when fetched.
* Sync interval changed to 30 minutes (custom WP-Cron interval).
* Frontend hint renamed to "orchestriert von klangagenda.de" and now
  hidden by default; site administrators must actively opt in via a
  checkbox in the settings before it is shown.
* All CSS and JavaScript are now loaded via `wp_enqueue_style()` /
  `wp_enqueue_script()` instead of inline `<style>`/`<script>` tags.
* Hardened output escaping and database queries per WordPress coding
  standards.

= 2.0.0 =
* Renamed to "Klangagenda Calendar Plugin" with its own top-level menu
  item in the WordPress backend.
* Shortcodes renamed to [klangagenda], [klangagenda_no_recurring],
  [klangagenda_konzerte] (previous [google_agenda] shortcodes remain
  functional for backward compatibility).
* New "Anleitung" tab with step-by-step instructions per calendar
  provider.
* Optional "powered by" hint on the frontend, toggleable in the
  backend.

= 1.3.1 =
* Fix: moved asset registration from `plugins_loaded` to
  `wp_enqueue_scripts` to avoid a WordPress notice ("headers already
  sent") when saving other forms.

= 1.3.0 =
* Konzerte shortcode: toggles for ticket button, description, and date
  badge; automatic removal of "(+)"/"(-)" markers from event titles.

= 1.2.0 =
* "Load more" button with AJAX loading and loading animation.
* Configurable accent/hover colors.

= 1.1.0 =
* Separate concerts shortcode with automatic "buy tickets" button.
* Fixed date windows (`ab`/`bis`) per post.

= 1.0.0 =
* Initial release: Google Calendar agenda view with RRULE support.

== Upgrade Notice ==

= 2.5.0 =
Adds settings for button corner radius, individual font size/color for
title, date, location and description, and optional month headings.
Existing settings and appearance are preserved.

= 2.4.0 =
Adds an on/off switch and color setting for the per-event description, plus
a click-to-open popup for events when it's hidden. Existing settings
(description shown, previous color) are preserved.

= 2.3.2 =
Events now appear immediately after the automatic table repair from 2.3.1,
without waiting for the next scheduled sync.

= 2.3.1 =
Fixes a "table doesn't exist" database error that could occur after
updating the plugin by overwriting its files instead of deactivating/
reactivating it in WordPress.

= 2.3.0 =
Adds three new selectable card-style calendar views plus a live preview/
selection UI in the backend. Existing settings and the current view
(standard) are preserved.

= 2.2.0 =
Legacy [google_agenda] shortcodes are removed – update any pages still
using them to [klangagenda] / [klangagenda_no_recurring] /
[klangagenda_konzerte] before updating.

= 2.1.0 =
Sync interval changes from hourly to every 30 minutes; the frontend
hint now reads "orchestriert von klangagenda.de" instead of "powered
by klangagenda.de" and is off by default until actively enabled.
Existing settings are preserved.
