=== Rouergue Creation Events Sidebar ===
Contributors: rock4temps
Tags: the-events-calendar, calendar-embed, sidebar, events
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.txt

This plugin provides a clean and controlled integration of Calendar Embed (The Events Calendar) into a WordPress sidebar.

== Description ==

This plugin was developed to address the limitations of **Calendar Embed** (The Events Calendar)
when it is used inside an **iframe embedded in a sidebar**.

By default, Calendar Embed enforces several behaviors that are not suitable for sidebar integration:

- events open in a new browser tab
- event content is loaded inside the iframe
- unnecessary interface elements are displayed (description, subscription, etc.)
- iframe height is not properly controlled

This plugin provides a **robust solution**, **without modifying The Events Calendar plugin**, by relying
on a controlled JavaScript interception and targeted CSS rules.

=== Main Features ===

- Calendar displayed **in monthly view only**
- Removal of unnecessary elements in the embed context:
  - custom description
  - calendar subscription block
- Sidebar-optimized iframe:
  - 100% width
  - fixed height (600px)
  - no border
  - no internal scrolling
- Click behavior fix:
  - neutralization of Calendar Embed JavaScript
  - events open **in the same browser tab**
- CSS and JavaScript conditionally applied to **Calendar Embed pages**
- Procedural, lightweight, and maintainable code
- No template overrides
- No theme dependency

== Setup ==

◆ [How To Configure Event Calendar Embeds](https://theeventscalendar.com/knowledgebase/event-calendar-embed/)

- Insert the iframe into the sidebar using a custom HTML block.
- Copy and paste the code below into the HTML block.
- In the code, replace the URL in the src attribute with the embed URL provided by Calendar Embed.
- The inline CSS ensures a fixed iframe height in the sidebar context.

**Integration code example:**
 
```
<style>
  @scope {
    iframe[data-tec-events-ece-iframe="true"] {
      width: 100%;
      max-width: 100%;
      height: 600px!important;
    }
  }
</style>
<iframe 
 data-tec-events-ece-iframe="true" 
 src="https://votresite.fr/calendar-embed/XXXXXXXX/embed/" 
 frameborder="0" 
 scrolling="no"> 
</iframe> 
```

👉 This plugin has no settings page.
No additional configuration is required.


== Démo ==

See the plugin in action on our [demo site](https://rouerguecreation.fr/demo/masterclasses-rock-4-temps/)


== Discover our other plugins ==

◆ [Easy Custom Event Tickets](https://wordpress.org/plugins/custom-event-tickets/)
◆ [Editor Custom Color Palette](https://wordpress.org/plugins/editor-custom-color-palette/)
◆ [Slider Galerie Native Responsive](https://wordpress.org/plugins/slider-galerie-native-responsive/)
◆ [Filter Bar Custom Post Type](https://wordpress.org/plugins/filter-bar-custom-post-type/)
◆ [Rouergue Création Top Notice Bar](https://wordpress.org/plugins/rouergue-creation-top-notice-bar/)


== Screenshots ==

1. Events calendar integrated into the sidebar


== Changelog ==

= 1.0.0 =

Initial release

Full Calendar Embed sidebar integration

Neutralization of the open in new tab behavior

Conditional loading of CSS and JavaScript on embed pages

