=== WPTinyKit – Simple Post Expiration (Auto Draft, Delete or Redirect) ===
Contributors: webcrafteragency
Tags: expiration, post status, auto draft, redirect, cleanup
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Schedule expiration for posts, pages, or CPTs. Change status, delete content, or redirect visitors after expiration — simple and lightweight.

== Description ==

**WPTinyKit – Simple Post Expiration** is a lightweight and flexible plugin for scheduling automatic content expiration in WordPress.

Whether you're running a limited-time offer, publishing time-sensitive announcements, or managing event listings, this plugin gives you full control over what happens when your content expires.

You can choose what happens to a post after it expires:
- Change status to **draft**
- **Permanently delete** the post
- Set a **301 redirect** to any URL (if action is “draft”)

🔹 Ideal for time-sensitive content, campaigns, offers, landing pages, or temporary announcements.

### ✅ Key Features

- Works with **Posts and Pages by default**
- Enable for **any custom post type**
- Add an **optional redirect URL** after expiration
- Clean and minimal UI integrated into post editor
- **Automatic cleanup** with built-in WP-Cron (every 5 minutes)
- Manual expiration check **when visiting the post**
- Admin column showing expiration status (Expired, Soon, Active)
- Full uninstall support – removes all data cleanly

### 🔧 Use Cases

- Expire marketing landing pages after campaign ends
- Hide outdated product announcements
- Redirect expired posts to your main shop or category page
- Auto-delete obsolete CPT items (events, offers, ads, etc.)

== Installation ==

1. Upload the plugin folder to the `/wp-content/plugins/` directory
2. Activate the plugin through the “Plugins” screen in WordPress
3. The plugin works automatically with **Posts and Pages**
4. To enable expiration for custom post types, go to **Settings → Post Expiration → Settings tab**
5. Edit any post, set the expiration date/time, choose an action, and optionally enter a redirect URL

== Screenshots ==

1. Expiration meta box in the post editor
2. Settings screen with post type selection
3. Instruction tab with usage guide
4. Expiration column in admin post list

== Frequently Asked Questions ==

= Does it work with custom post types? =
Yes. Posts and Pages are enabled by default. You can enable any public custom post types via **Settings → Post Expiration → Settings tab**.

= Will the plugin delete posts automatically? =
Only if you explicitly choose the “Delete” action. Otherwise, it just changes status or redirects visitors.

= What if a visitor accesses a post after expiration? =
If you selected the “Draft” action and provided a redirect URL, the plugin will instantly redirect the visitor using 301.

= Does it rely on WP Cron? =
Yes. A check runs every 5 minutes in the background. Additionally, expiration is enforced in real-time when a post is accessed.

= Is this plugin GDPR-compliant? =
Yes. The plugin does not collect or store any user data.

= Does it support Gutenberg or Classic Editor? =
Yes. The plugin works with both Gutenberg and Classic Editor. The expiration meta box appears in the sidebar or below the editor, depending on the editor used.

== Changelog ==

= 1.0.0 =
* Initial release
* Support for posts, pages and CPTs
* Expiration actions: draft, delete, redirect
* Admin UI and meta box
* Cron and real-time expiration logic
* Instruction tab, full uninstall, translation-ready

== Upgrade Notice ==

= 1.0.0 =
First public release

== License ==

This plugin is licensed under the GPLv2 or later.
