=== Custom Events for Pods & Elementor ===
Contributors: nelg
Donate link: https://www.nelg.fr/plugins-wordpress
Tags: elementor, pods, events, custom fields, elementor pro
Requires at least: 6.4
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Connects Pods event fields with Elementor Pro and provides shortcode-based event listings with recurring events support.

== Description ==

NELG Custom Events for Pods & Elementor helps display event content stored with Pods in Elementor Pro and through dedicated shortcodes.

This plugin is designed for event websites where a Pods custom post type stores events and one or more custom fields control start date, end date, and recurring status.

Features include:

* Dynamic selection of Pods custom post types.
* Dynamic selection of Pods fields for start date, end date, and recurring events.
* Optional hiding of past events based on the selected end date field.
* Dedicated shortcode for standard events.
* Dedicated shortcode for recurring events.
* Infinite scroll loading for event lists when more events are available.
* Configurable spacing in pixels between event items.
* Elementor template selection for event item rendering.
* AJAX-based loading with nonce verification.
* Native WordPress internationalization support using the `/languages/` folder.
* Object-oriented codebase following WordPress conventions.

The plugin supports event rendering through Elementor templates and is intended to work with Pods and Elementor Pro.

If Pods or Elementor Pro is missing, the plugin will not run correctly and an admin notice will be displayed.

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/`.
2. Upload the plugin logo file to `assets/images/Logo-Vignette-APP-CEPE-NELG.png` if it is not already included in the plugin package.
3. Activate Pods.
4. Activate Elementor and Elementor Pro.
5. Activate Custom Events for Pods & Elementor.
6. Go to `Settings > Custom Events Pods`.

== Frequently Asked Questions ==

= What plugins are required? =

This plugin requires:

* WordPress
* Pods
* Elementor
* Elementor Pro

= How do I configure the plugin? =

Go to `Settings > Custom Events Pods` and configure:

* Pods Post Type
* Start date field
* End date field
* Recurring event field
* Hide past events
* Elementor item template
* Default number of events
* Gap between event items

= How do I display standard events? =

Use the shortcode:

`[cepe_events]`

This shortcode displays standard events and excludes recurring events by default.

= How do I display recurring events? =

Use the shortcode:

`[cepe_recurring_events]`

This shortcode displays only recurring events.

= What value is used for a checked recurring field in Pods? =

For a Pods `Yes / No` field, a checked value is typically stored as `1`, and an unchecked value as `0`.

= Does the plugin support infinite scroll? =

Yes. Event lists can automatically load more events while the user scrolls down the page, if additional pages of events are available.

= Can I control the number of events displayed? =

Yes. You can define a default number of events in the plugin settings, and you can also override it in shortcode attributes.

Example:

`[cepe_events posts_per_page="6" order="ASC"]`

= Can I control the spacing between events? =

Yes. The plugin settings include a value in pixels for the vertical gap between event items.

= How are past events hidden? =

If the option is enabled, the plugin compares the current WordPress site date and time with the selected end date field. If no end date field is selected, the start date field can be used as a fallback depending on plugin configuration.

= Does the plugin work with Elementor Loop Grid or Loop Carousel? =

Yes, when using the Elementor query integration version of the plugin and the configured Query ID in the widget settings.

== Screenshots ==

1. Plugin settings page in WordPress admin.
2. Selection of Pods fields for event dates and recurring status.
3. Example of event output rendered with an Elementor template.
4. Infinite scroll loading additional events on the front end.

== Changelog ==

= 1.0 =

* Initial release.
* Added Pods post type selection.
* Added dynamic Pods field selection.
* Added start date and end date configuration.
* Added recurring field selection.
* Added shortcode for standard events.
* Added shortcode for recurring events.
* Added Elementor template rendering for event items.
* Added configurable gap between event items.
* Added optional hiding of past events.
* Added infinite scroll loading for event lists.
* Added security hardening with sanitization, escaping, capability checks, and nonces.
* Added logo support in the settings page.
* Added documentation in readme.txt.

== Upgrade Notice ==

= 1.0 =

Initial public release of Custom Events for Pods & Elementor.