=== Expire Content Block ===
Contributors: zellerpure
Tags: block, gutenberg, timed content, expire, schedule
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Block that hides or replaces content after a set date/time. Perfect for promotions, events, and temporary announcements.

== Description ==

**Expire Content Block** is a simple but powerful Gutenberg block that lets you schedule content expiration — without shortcodes, without coding, and with live visual previews while editing.

Place any blocks inside it (images, text, buttons, forms, anything), set an expiry date and time…
After that moment, the content will **automatically be hidden** or **replaced with a custom message**.

Perfect for:
- Limited-time promotions
- Event registration closing
- Temporary announcements
- Holiday notices
- Launch campaigns
- Membership or course content phases

### Key Features
- 100% native Gutenberg block (no shortcode mess)
- Add any blocks inside using InnerBlocks
- Choose expiry date & time via DateTimePicker
- Define behavior:
  - **Hide content after expiry**
  - **Replace content with a custom message**
- Editor preview mode shows how expired content will appear
- Server-side rendering for accurate scheduling
- Lightweight and fast — zero frontend JS required
- Safe content sanitization with `wp_kses_post()`

### Why this plugin?
Most “timed content” plugins rely on shortcodes or old TinyMCE dialogs.
Expire Content Block brings the experience to **modern block editor standards**, with intuitive UI and visual feedback.

### Future PRO Features (coming soon)
- Show content *between* specific dates
- Multiple expiration rules per block
- WooCommerce-based expiration triggers
- Geolocation + time-based conditions
- Replace with saved block patterns or templates
- Analytics: how many times the block was shown before expiry

== Installation ==
1. Upload the plugin folder to `/wp-content/plugins/expire-content-block`, or install via Plugin Upload.
2. Activate the plugin through the *Plugins* menu in WordPress.
3. In the Gutenberg editor, search for **Expire Content** block.
4. Add blocks inside it, set expiry date/time in the inspector panel.
5. Choose whether to hide or replace the content after expiration.

== Screenshots ==
1. **The Expire Content block wrapper in the editor**
2. **Inspector panel: date & time picker + actions**
3. **Preview of expired content inside editor (overlay mode)**
4. **Frontend replacement message shown after expiration**

== Frequently Asked Questions ==
= Does this block work with any theme? =
Yes, it uses native Gutenberg APIs and works with any block-enabled theme.

= Will the content be hidden exactly at the specified time? =
Yes. The expiration is processed on the server using WordPress timezone and server-side rendering.

= Can I nest any type of block inside it? =
Yes. Text, images, buttons, videos, forms — anything Gutenberg supports.

= Does it use JavaScript on the frontend? =
No. The expiration logic is fully server-side for accuracy and performance.

= What happens if no expiry date is set? =
The content will behave normally and remain visible.

= Is a PRO version planned? =
Yes — with time ranges, WooCommerce triggers, geolocation rules, templates, analytics and more.

== Changelog ==
= 1.0.0 =
* Initial release with:
  - Expiry date & time selection
  - Hide or replace content after expiry
  - Editor preview and badges
  - Server-side rendering

== Upgrade Notice ==
= 1.0.0 =
First stable version of Expire Content Block.
