=== ICS Calendar Feed Block ===
Contributors: icscalendarfeedblock
Tags: calendar, ical, ics, events, google calendar
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Show any public ICS / iCal calendar feed as a month, week or list calendar block. Caching, time zones and recurring events included.

== Description ==

ICS Calendar Feed Block turns any public calendar address into a clean, mobile-friendly calendar on your site. Paste the ICS (iCal) link from Google Calendar, Outlook / Microsoft 365, Apple iCloud, Nextcloud, Proton, church management software, school systems or sports club tools — no account connection, no API keys, just the standard ICS format.

Built for churches, clubs, schools, libraries and community groups who keep their schedule in a calendar app and want it on their website without retyping events.

**Features**

* **ICS Calendar block** for the block editor with live preview, plus the `[icsfb_calendar]` shortcode for classic content and widgets.
* **Month, week and list views** with previous / today / next navigation and an optional view switcher for visitors. Works without JavaScript.
* **Recurring events** done right: daily, weekly, monthly and yearly rules with intervals, counts, end dates, "second Sunday" or "last Friday" style rules, excluded dates, extra dates and moved or cancelled single occurrences.
* **Time zone handling**: events are converted to your site time zone, including Outlook / Exchange (Windows) zone names, UTC and floating times. All-day events never shift a day.
* **Fast and polite caching**: feeds are cached and refreshed in the background with WP-Cron, so visitors never wait on the calendar server. If a feed is briefly down, the last good copy keeps showing.
* **Feed status screen** showing the last refresh, number of events and any error, with a one-click "refresh now" button.
* **Mobile layout**: on small screens the month and week views turn into an easy-to-read agenda.
* Accessible markup (real links, table headers, ARIA labels), translation ready, and styles that follow your theme.

**Shortcode examples**

`[icsfb_calendar]` — uses the default feed and view from the settings.

`[icsfb_calendar url="https://example.com/calendar.ics" view="list" limit="10" days="30"]`

Options: `url`, `view` (month, week, list), `title`, `color`, `limit`, `days`, `switcher` (yes/no).

**Privacy**

The plugin downloads the calendar feed you enter from your server and stores a cached copy in your database. Visitors' browsers do not contact the calendar provider. No data is sent anywhere else.

**Pro version**

ICS Calendar Feed Block Pro adds saved calendars that can be merged into one color-coded view with a clickable legend, include / exclude keyword filters, an accessible event detail pop-up with location map link and description, and four style presets (Minimal, Bold, Dark and Pastel).

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/` or install it from the Plugins screen.
2. Activate the plugin.
3. Go to **Settings → ICS Calendar Feed** and paste your public ICS feed URL (optional — each block can have its own).
4. Edit a page, add the **ICS Calendar** block and choose a view.

== Frequently Asked Questions ==

= Where do I find my calendar's ICS address? =

Google Calendar: Settings → your calendar → "Public address in iCal format" (the calendar must be public). Outlook: Settings → Calendar → Shared calendars → Publish a calendar → ICS link. Apple iCloud: share the calendar as a public calendar and copy the webcal:// link — the plugin converts it to https:// automatically.

= How often is the calendar updated? =

By default every 60 minutes; you can choose between 5 minutes and 24 hours. Use "Refresh all feeds now" on the settings screen to update immediately.

= Event times are off by some hours. =

Events are shown in the time zone set under Settings → General. Choose a city there (for example "New York" instead of "UTC-5") so daylight saving time is handled correctly.

= Can I show several calendars in one view? =

Each block shows one feed in the free version; add several blocks for several calendars. Merging calendars into one view is part of the Pro version.

= Does it work with page caching plugins? =

Yes. Calendar navigation uses normal links, so cached pages still work. The feed itself is refreshed in the background.

= What happens if the feed is unavailable? =

The last successfully downloaded copy keeps showing. Editors see the error message on the page and in the feed status table; visitors only see a short notice when no copy is available at all.

== Screenshots ==

1. Month view with recurring events and today highlighted.
2. List view of upcoming events.
3. Week view.
4. Block settings in the editor.
5. Settings screen with feed status.

== Changelog ==

= 1.0.1 =
* Clear message when a feed URL is not a public address.
* Cleaner admin menu (no separate Contact Us item).

= 1.0.0 =
* Initial release.
