 === GravityCalendar ===
Tags: gravitykit
Requires at least: 5.3
Requires PHP: 7.4
Tested up to: 6.4.3
Stable tag: trunk
Contributors: The GravityKit Team
License: GPL 3 or higher

Display Gravity Forms entries in a dynamic calendar.

== Installation ==

1. Upload plugin files to your plugins folder, or install using WordPress's built-in Add New Plugin installer
2. Activate the plugin
3. Follow the instructions

== Changelog ==

= 2.6.1 on February 29, 2024 =

This release fixes a critical error when creating new calendar feeds, addresses issues with event time updates during movement or resizing, and updates internal components for enhanced performance and compatibility.

#### 🐛 Fixed
* Time now updates during moving and resizing of an event.
* Creating a new calendar feed no longer returns an error.

#### 🔧 Updated
* [Foundation](https://www.gravitykit.com/foundation/) to version 1.2.9.
  - GravityKit products that are already installed can now be activated without a valid license.
  - Fixed PHP warning messages that appeared when deactivating the last active product with Foundation installed.

= 2.6 on February 21, 2024 =

This release enhances security, addresses multiple issues related to conditional logic, resolves a compatibility issue with DataTables version 3.3 and higher, and updates essential components to enhance performance.

#### 🔐 Security
* Calendars can now choose to "Enable security" that forces the use of a `secret` attribute on shortcodes. [Learn about the `secret` attribute](https://docs.gravitykit.com/article/991-secret-shortcode-attribute).

#### 🚀 Added
* A calendar shortcode can now be copied by a single click on the shortcode field.

#### 🐛 Fixed
* Fatal error when using DataTables with client-side processing enabled.
* PHP 8.1+ deprecation notice.
* Filtering by progress in conditional logic now accurately interprets entry's '100%' completion rate as 'complete'.
* Processing conditional logic filters for non-date fields no longer results in errors.
* "Form field ID #X is no longer available" error when adding conditional logic, despite the field existing.
* "Created by Currently Logged-in User (Disabled for Administrators)" filter not functioning correctly with field conditional logic.
* Incorrect results when filtering checkbox fields using the "is not" condition.

#### 🔧 Updated
* [Foundation](https://www.gravitykit.com/foundation/) to version 1.2.8.
  - Transients are now set and retrieved correctly when using object cache plugins.
  - Fixed a JavaScript warning that occurred when deactivating license keys and when viewing products without the necessary permissions.
  - Resolved PHP warning messages on the Plugins page.

= 2.5 on December 21, 2023 =

This release adds support for displaying multiple public calendar feeds on the same calendar and improves the performance of remote feeds.

#### 🚀 Added
- Support for showing multiple public calendar feeds on the same calendar by separating URLs with commas.

#### ✨ Improved
- Caching of remote feeds for 10 minutes to enhance performance.

#### 💻 Developer Updates:
- Added the `gk/gravitycalendar/event-sources` filter to modify extra calendars displayed on a calendar. [See example code](https://gist.github.com/zackkatz/9acc181ae9bbd1c339ca614e64ccb733).
- Modified the `$extra_options` array passed to the `gravityview/calendar/extra_options` filter:
    - Removed the `ical_feed` key.
    - Removed the `ical_color` key.
    - Added the `ical_feeds` key, containing an array of all public calendar feed URLs with this structure:
        - `url`: URL to the public calendar feed.
        - `color`: any valid CSS color.
        - `type`: `ics` or `json`.

= 2.4.3 on December 19, 2023 =

* Fixed: Conditional logic in GravityCalendar feeds causes a fatal error if GravityView is not installed

= 2.4.2 on December 12, 2023 =

* Fixed: GravityCalendar feeds now correctly handle relative dates (e.g., "today", "yesterday") in conditional logic configured for date fields
* Fixed: View's Advanced Filter conditions not being respected inside the View calendar widget
* Updated: [Foundation](https://www.gravitykit.com/foundation/) to version 1.2.6

__Developer Updates:__

* Added: `gk/gravitycalendar/events/custom-response` filter to short-circuit the event fetching process and return a custom response

= 2.4.1 on November 29, 2023 =

* Fixed: Excessive whitespace appearing in the categories section when using the block editor

= 2.4 on November 9, 2023 =

* Added: Option to automatically attach an ICS event calendar file to form notification emails
* Improved: Performance when querying events on hosts with limited resources
* Fixed: Date picker not working in Conditional Logic
* Fixed: Deprecation notice in PHP 8.2+
* Fixed: Calendar feed's Conditional Logic not being respected inside the View widget
* Fixed: Fatal error when the View widget is configured to display all entries
* Updated: [Foundation](https://www.gravitykit.com/foundation/) to version 1.2.5

__Developer Updates:__

* Deprecated: `GravityView_Widget_Calendar::get_entries()` method
* Removed:
    - `GV_Extension_Calendar_Feed::calculate_fullcalendar_plugins()` and `GV_Extension_Calendar_Feed::convert_button_to_plugin_name()` methods that was deprecated in 1.5
    - `GV_Extension_Calendar_Feed::calculate_frontend_enqueues()` method that was deprecated in 1.5.1
    - `gravityview/calendar/settings/search_criteria` filter that was deprecated in 1.5.7
* Added: `gk/gravitycalendar/settings/db-batch-size` filter to modify the number of entries fetched from the database at a time

= 2.3.6 on September 18, 2023 =

* Fixed: Calendar Buttons and Link blocks not working in the Gutenberg editor
* Fixed: "Copy Calendar Feed URL" button not copying the URL to the clipboard
* Fixed: Multi-line description fields in calendar feeds would only display the first line of text

= 2.3.5 on September 7, 2023 =

* Improved: Support for RTL languages
* Fixed: Events starting before or ending after the visible date range of the view were not being displayed
* Updated: [Foundation](https://www.gravitykit.com/foundation/) to version 1.2.2

= 2.3.4 on July 12, 2023 =

* Fixed: Incompatibility with some plugins/themes that use Laravel components
* Fixed: Timezone issues for all-day events in ICS feeds
* Updated: [Foundation](https://www.gravitykit.com/foundation/) to version 1.1.1

= 2.3.3 on February 23, 2023 =

* Fixed: "Greater than" and "less than" comparison not working with the "Total" field in conditional logic
* Fixed: It was possible for the "Calendar Controls" setting to become corrupted
* Fixed: All-day single-day events could span multiple days due to timezone issues
* Removed: Calendar formatting validation for the "Display Events from Another Calendar Feed" setting because the validation was too strict
* Updated: [Foundation](https://www.gravitykit.com/foundation/) to version 1.0.9

= 2.3.2 on January 5, 2023 =

* Updated: [Foundation](https://www.gravitykit.com/foundation/) to version 1.0.8

= 2.3.1 on December 21, 2022 =

* Fixed: PHP 8.1 notices
* Fixed: Fatal error on some hosts due to a conflict with one of the plugin dependencies (psr/log)

= 2.3.0.1 on December 16, 2022 =

* Fixed: Calendar Feed URL wasn't loading necessary scripts

= 2.3 on December 15, 2022 =

* Added: You can now show other calendar feeds on a calendar using the Calendar Feed URL setting [(read how to add calendar feeds)](https://docs.gravitykit.com/article/899-displaying-events-from-another-calendar)

= 2.2.5 on December 14, 2022 =

* Fixed: The plugin would display a notice requiring Gravity Forms 2.5 even if it's already installed
* Fixed: Fatal error on some hosts that use weak security keys and salts

= 2.2.4 on December 1, 2022 =

* Fixed: It was not possible to remove an expired license key

= 2.2.3 on November 29, 2022 =

Fixed: "Undefined index" PHP notice

= 2.2.2 on November 14, 2022 =

* Fixed: Fatal error when loading plugin translations
* Fixed: Slow loading times on some hosts
* Fixed: Plugin failing to install on some hosts

= 2.2.1 on October 31, 2022 =

* Added: Support for future "Event" Gravity Forms field type when choosing a date field
* Fixed: Plugin was not appearing in the "Add-Ons" section of the Gravity Forms System Status page

= 2.2 on October 24, 2022 =

* Added: New WordPress admin menu where you can now centrally manage all your GravityKit product licenses and settings ([learn more about the new GravityKit menu](https://www.gravitykit.com/foundation/))
    - Go to the WordPress sidebar and check out the GravityKit menu!
    - We have automatically migrated your existing GravityCalendar license, which was previously entered in the Gravity Forms settings page
    - Request support using the "Grant Support Access" menu item
* Fixed: FullCalendar and Popper libraries were updated to the latest versions but not included in the previous release
* Fixed: Potential fatal error when parsing shortcodes

= 2.1 on September 1, 2022 =

* Improved: Now you can use the [`{get}` Merge Tag](https://docs.gravitykit.com/article/314-the-get-merge-tag) to filter displayed entries by passing URL parameters
* Updated: The name of the plugin is now GravityCalendar, so we updated shortcodes to use the new name. Prior shortcodes will continue to work!
    - `[gravitycalendar]` instead of `[gv_calendar]`
    - `[gravitycalendar_link]` instead of `[gv_calendar_link]`
    - `[gravitycalendar_copy_button]` instead of `[gv_calendar_copy_button]`
    - `[gravitycalendar_export_button]` instead of `[gv_calendar_export_button]`
* Updated: Use the GravityCalendar icon in the plugin menu and on blocks
* Fixed: Scripts and styles were loading on pages without calendars

__Developer Updates:__

* Updated: FullCalendar library from 5.10.1 to 5.11.3
* Updated: Popper library from 2.9.3 to 2.11.6

= 2.0.2 on July 31, 2022 =

* Updated: Uses our new GravityCalendar icon in the Gravity Forms menu
* Fixed: Javascript error when configuring Legacy Widgets in the WordPress Dashboard
* Tested to WordPress 6.0.1

= 2.0.1 on April 19, 2022 =

* Fixed: Invalid `.ics` file is generated when using a manual timezone offset (e.g., 'UTC-4' instead of 'America/New_York')

= 2.0.0.1 on March 15, 2022 =

* Fixed: Calendar feeds not working due to the library not being included in the downloaded file

= 2.0 on February 17, 2022 =

**Note: This version requires WordPress 5.3 and PHP 7.4 or newer.**

* Added: Calendar subscription links! People can now subscribe to your calendar feed in Google Calendar and Apple Calendar
    - Visitors can also download `.ics` files that can be imported into calendars
    - New "GravityView Calendar Link" and "GravityView Calendar Buttons" blocks to make it easy to share links to your calendars ([learn how to use the new blocks](https://docs.gravitykit.com/article/830-calendar-blocks))
    - New `[gv_calendar_link]`, `[gv_calendar_export_button]`, and `[gv_calendar_copy_button]` shortcodes ([learn about the new shortcodes](https://docs.gravitykit.com/article/831-calendar-shortcodes))
* Fixed: Styles not outputting when a calendar is embedded on block themes (in WordPress 5.9 and higher)
* Fixed: Translations not loading properly
* Fixed: Merge tags were not being processed inside Conditional Logic
* Fixed: Calendar height setting now allows [all CSS units](https://fullcalendar.io/docs/height)
* Upgraded: FullCalendar from 5.6 to 5.10.1
    - Improved accessibility
    - Many fixes to tooltip behavior
    - [See the FullCalendar changelog](https://github.com/fullcalendar/fullcalendar/tags)
* Updated: Polish translation (Thanks Dariusz Z!)

= 1.7.0.1 on December 20, 2021 =

* Fixed: Potential fatal error when Calendar is embedded on a page and GravityView is not installed. Calendar does _not_ require GravityView, sorry for the issue.

= 1.7 on December 16, 2021 =

The next version of Calendar adds great functionality that requires PHP 7.4. **Please contact your host to update your PHP version!**

* Updated: Now using [Version 5.10.1 of FullCalendar](https://github.com/fullcalendar/fullcalendar/releases/tag/v5.10.0). There are HTML changes as well as accessibility improvements.
* Improved: Calendar week start day now defaults to the value of the "Week Starts On" setting configured in WordPress. [Read how to modify the week start date](https://docs.gravitykit.com/article/814-calendar-week-start).
* Improved: Added "Entry Approval Status" option under Conditional Logic
* Improved: It is now possible to filter only those entries that have been updated since creation
* Fixed: Event description tooltip would be displayed underneath an event when using an Agenda layout with overlapping events
* Fixed: JavaScript error when a Conditional Logic filter is configured for a multi-input form field that no longer exists
* Fixed: MySQL error on certain hosts when "Date Updated", "Date Created" or "Payment Date" entry meta are filtered using the "is empty" condition
* Fixed: Removed a line of code that only works in PHP 7.0

= 1.6.1 on September 27, 2021 =

* Fixed: Fatal error when trying to detect Gutenberg editor
* Fixed: Events without defined start/end time and spanning multiple days (e.g., September 28-30) would show as ending one day earlier
* Fixed: Plugin styles and scripts would load on pages that do not have embedded calendars
* Improved: Fully hiding Calendar feed options that should only be shown when a linked option is toggled

= 1.6.0.1 on September 10, 2021 =

* Fixed: [GP Nested Forms](https://gravitywiz.com/documentation/gravity-forms-nested-forms/) compatibility issue

= 1.6 on August 31, 2021 =

* Added: New Conditional Logic that lets you filter events using AND/OR operators
    - Many more Conditional Logic filtering options are available!

__Developer Updates:__

* Updated: [FullCalendar](https://fullcalendar.io/) library was updated to v5.9 (see a [list of changes](https://github.com/fullcalendar/fullcalendar/releases/tag/v5.9.0))
* Updated: [Popper](https://popper.js.org/) library was updated to v2.9.3 (see a [list of changes](https://github.com/popperjs/popper-core/releases/tag/v2.9.3))

= 1.5.6 on August 5, 2021 =

* Fixed: Line breaks ("\n") appearing in event title/description
* Fixed: Fatal error when dragging and dropping events

= 1.5.5 on July 22, 2021 =

* Added: Settings option to control the display of HTML content in event title/description
    - Please note that this option is disabled by default and you may have to update your Calendar feed settings
* Fixed: Display of event color swatches in Calendar feed settings

= 1.5.4 on June 28, 2021 =

* Fixed: Events that had a start time but no end time were being shown as ending at 23:59
* Fixed: Fatal error when event has an incorrect start/end time (e.g., "00:00 pm")

__Developer Updates:__
* Added: `gravityview/calendar/events/allow_invalid_start_date` filter to allow events with invalid start date

= 1.5.3 on June 16, 2021 =

* Fixed: Event titles would duplicate when navigating between months
* Updated: [FullCalendar](https://fullcalendar.io/) library was updated to v5.8 (see a [list of changes](https://github.com/fullcalendar/fullcalendar/releases/tag/v5.8.0))

= 1.5.2 on June 15, 2021 =

* Improved: Event description tooltips are now interactive by default
* Fixed: Event tooltips will not show when the description is empty

= 1.5.1 on May 24, 2021 =

* Fixed: Plugin scripts and styles interfering with page/post editor
* Fixed: Calendar Gutenberg block preview not being generated
* Fixed: Calendar controls setting not being saved in Gravity Forms 2.5
* Fixed: Loader animation in GravityView DataTables layout
* Updated: [FullCalendar](https://fullcalendar.io/) library was updated to v5.7 (see a [list of new features](https://fullcalendar.io/blog/2021/05/new-features-in-v570))

= 1.5 on May 13, 2021 =

* Added: Dynamic loading of events based on the date range displayed by the Calendar view
* Improved: Compatibility with Gravity Forms 2.5
* Improved: Synchronization with the GravityView DataTables layout
* Improved: The previously used tooltip library was replaced with [Tippy.js](https://atomiks.github.io/tippyjs/) v6.3.0
    - The tooltip element structure has changed and will break any custom styles
    - A custom `gv-calendar` theme is used that can be styled as per [the official guide](https://atomiks.github.io/tippyjs/v6/themes/)
* Updated: [FullCalendar](https://fullcalendar.io/) library was updated to v5.6
	- This is a major release that introduces breaking changes; please consult the [v5.x upgrade guide](https://fullcalendar.io/docs/upgrading-from-v4)
* Updated: [Popper](https://popper.js.org/) library was updated to v2.9.2

__Developer Updates:__
* Updated: New, updated and deprecated methods in the `GV_Extension_Calendar_Feed`, `GravityView_Calendar_Ajax` and `GravityView_Widget_Calendar` classes
* Added: `gravityview/calendar/extra_options` filter to modify non-core calendar options (e.g., AJAX URL, nonce, etc.)

= 1.4.4 on March 10, 2021 =

* Added icon for [GravityView 2.10](https://www.gravitykit.com/210-admin-refresh/) widget picker
* Fixed: Calendar would improperly display entries edited using GravityView's Inline Edit extension; thank you, Thomas!

__Developer Updates:__

* Added: `gravityview/calendar/settings/search_criteria` filter to specify search criteria for form entries with events.
* Added: `gravityview/calendar/settings/sort_order` filter to specify sort order for form entries with events.

= 1.4.3 on August 27, 2020 =

* Fixed: Calendar preview fails to load until a new Feed is saved

= 1.4.2 on August 25, 2020 =

* Fixed: Calendar preview throws an error when GravityView plugin is not activated
* Fixed: Multiple calendars sharing a single Feed ID can't be displayed on the same page
* Improved: DB query excludes entries with empty start/end dates
* Modified: End Date is no longer and unless specified will be based on the Start Date
* Updated: Russian translation (thank you, Irina F!) and Polish translation (thank you, Dariusz Z!)

= 1.4.1 on August 10, 2020 =

* Fixed: DataTables View layouts no longer being displayed
* Fixed: Calendar preview not working inside the Gutenberg editor

= 1.4 on August 6, 2020 =

* Added: Compatibility with Gravity Forms 2.5
* Added: You can now use shortcodes inside the Event Title and Event Description feed settings
* Added: Integration with the [Members plugin](https://wordpress.org/plugins/members/)
* Modified: Start time will not be displayed for all-day events
* Fixed: GravityView widget not applying View settings (e.g., filter conditions) to events selected for display
* Fixed: Event tooltips not may not appear for themes or plugins using Bootstrap tooltips
* Fixed: Two-day events without start/end time would display as a one-day event
* Fixed: Scripts/styles are enqueued when their dependencies are not registered
* Fixed: Calendar preview throws an error when a feed has not yet been created
* Fixed: PHP error when deactivating Calendar in GravityView Extensions installer
* Fixed: Calendar grid looked bad with some themes due to CSS margins

__Developer Updates:__

* Updated FullCalendar scripts to 4.4.2
* Added: `gravityview/calendar/events/do_shortcodes` Whether to process shortcodes in the event title and event description
* Added: `gravityview/calendar/events/source_data` filter to define form entries that will be used as the basis for FullCalendar events
* Added: `gravityview/calendar/options` filter to modify calendar options that are passed to FullCalendar
* Added: `gravityview/calendar/events` filter to modify the events array that is passed to FullCalendar
* Added: `gravityview/calendar/shortcode/render/element_attributes` filter to apply attributes to the calendar container element
* Modified: Stopped using `gravityforms_edit_forms` capability for access to Calendar settings. Now using `gravityview_calendar` capability.
* Modified: Event description tooltips now use `.gv-tooltip` and `.gv-tooltip-arrow` classes instead of `.gv_tooltip` and `.tooltip-arrow`
* Modified: Set `.gv-fullcalendar table` margin to `0` to fix display issues for the nested tables in the calendar output
* Fixed: `scripts/fullcalendar/locales_dir_url` filter was not being applied

= 1.3 on February 19, 2020 =

* Added: Support for localization
* Fixed: Event description not appearing in calendar
* Fixed: Calendar not editable when using Members plugin
* Fixed: Calendar not updating to past or future events when there are no current events
* Updated: Polish translation - thank you Dariusz Z!

__Developer Updates:__

* Added: `gravityview/calendar/default_locale` filter to set the default locale. By default, it is set to the site's locale.
* Added: `gravityview/calendar/scripts/fullcalendar/locales_dir_url` modify URL path to [FullCalendar locales directory](https://fullcalendar.io/docs/locale). Modify this to use your own locales.

= 1.2.1 on February 3, 2020 =

* Fixed: Entries were not being displayed on calendars

= 1.2 on January 23, 2020 =

* Added: Entries can be displayed on calendars using the date they were created or last updated!
* Added: Setting to control behavior of the calendar when there are no events shown ([see the options](https://docs.gravitykit.com/article/669-no-current-events))
* Improved: Translated error messages
* Updated: Polish translation (thank you, Dariusz!)
* Fixed: Editing entries
* Fixed: Respect GravityView Advanced Filter settings for a View
* Fixed: Sample events were showing up in GravityView Views when there were no matching entries
* Fixed: Fatal error when GravityView isn't loaded or
* Fixed: Fatal error when `get_editable_roles()` isn't defined

= 1.1 on November 20, 2019 =

* Added: **GravityView integration**
    - Show View entries on a new Calendar widget
    - Choose to show all View entries, or only entries currently-visible for the View
* Added: Gutenberg Calendar block
* Added: Visual picker for event colors
* Improved: Use sample calendar events until feed fields are configured
* Fixed: Fatal error when deactivating Gravity Forms when Calendar is active
* Fixed: Number of entries displayed on calendar limited to 20
* Fixed: Tooltip description added for the "Event Color" feed setting

__Developer Updates:__

* Updated from FullCalendar 4.1.0 to 4.3.0
* Added: `gravityview/calendar/events/include|exclude` filters to add/remove specific entries from rendering
* Added: `gravityview/calendar/settings/total-event-limit` filter to change max # of entries displayed on a calendar (default: `1000`)
* Improved: Only enqueue scripts and styles for tooltips if there is an event description configured
* Fixed: Scripts and styles being added to all pages, not just pages with calendars embedded


= 1.0 on November 12, 2019 =

* Launch!
