=== Annovisio ===
Contributors: ralf_st
Tags: calendly, calendar, event calendar, yearly calendar, multi-day events
Requires at least: 6.2
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Sync Calendly event types to WordPress and display them in a clean yearly calendar with support for multi-day events.

== Description ==

Annovisio connects a WordPress site with Calendly and displays imported event types in a clear yearly calendar.

Features:

* Display Calendly event types in a yearly calendar via shortcode
* Support multi-day events
* Sync Calendly event types manually
* Optional automatic synchronization via WP-Cron
* Settings page in the WordPress admin area

This plugin is designed for site owners who want to present bookable event formats in a compact annual calendar view.

== External services ==

This plugin uses Calendly as an external service. Calendly is required to synchronize Calendly event types into WordPress, to check availability before opening a booking dialog, and to display Calendly's booking popup on frontend pages that use the `[annovisio]` shortcode.

External services used:

* Calendly service: https://calendly.com
* Calendly API endpoint used by the plugin: https://api.calendly.com
* Calendly frontend widget assets loaded by the shortcode: https://calendly.com/assets/external/widget.js and https://calendly.com/assets/external/widget.css

What is sent to Calendly and when:

* During manual synchronization and WP-Cron automatic synchronization, the plugin sends authenticated server-side GET requests to `https://api.calendly.com` using the Calendly Personal Access Token configured by the site administrator in the WordPress admin area.
* During synchronization, the plugin requests Calendly data from `/users/me` and `/event_types`. For availability checks, the plugin requests `/event_type_available_times`. Request parameters can include Calendly user URI, event type URI, `active`, `count`, start/end time values, and Calendly pagination URLs returned by previous API responses.
* When a site visitor clicks an event rendered by the `[annovisio]` shortcode, the visitor's browser first calls this plugin's WordPress REST endpoint on the same WordPress site with the Calendly event type URI and either a selected date or a UTC slot start. The plugin then sends a server-side authenticated request to Calendly's `/event_type_available_times` endpoint with the event type URI and the calculated start/end time window.
* On frontend pages where the `[annovisio]` shortcode renders the calendar, the visitor's browser loads Calendly's widget JavaScript and CSS from `calendly.com` so Calendly's booking popup can be displayed. Interactions inside the Calendly booking popup are handled by Calendly.

Calendly legal links:

* Terms: https://calendly.com/legal/customer-terms-conditions
* Privacy: https://calendly.com/legal/privacy-notice

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/annovisio/` directory, or install the plugin through the WordPress plugins screen.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Open **Settings > Annovisio**.
4. Enter your Calendly Personal Access Token and configure the plugin settings.
5. Run a manual sync or enable automatic synchronization.
6. Add the shortcode `[annovisio]` to a page or post.

== Frequently Asked Questions ==

= Does this plugin require Calendly? =

Yes. The plugin is built to work with Calendly event types and requires a Calendly Personal Access Token for synchronization.

= Can I use the plugin without automatic sync? =

Yes. You can also use manual synchronization.

= Does the plugin load external resources on the frontend? =

Yes. On frontend pages where the `[annovisio]` shortcode renders the calendar, the plugin loads Calendly's official widget script and stylesheet so the booking popup can be shown. The plugin also performs a server-side availability check against the Calendly API when a visitor clicks an appointment link.

== Changelog ==

= 1.0.0 =
* Initial release
