=== Post Expiration ===
Contributors: snehalpancholi
Tags: post expiration, scheduled post, auto draft, expire post, content scheduling
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.1
Stable tag: 1.0.0
License: GPL-2.0+
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Set an expiry date on any post or page. When the time comes, it automatically switches to draft or trash.

== Description ==

Post Expiration adds a sidebar meta box to posts, pages, and any custom post type. Set a precise date and time; when that moment arrives, WP-Cron automatically changes the post status — no manual action required.

**Features:**

* Datetime-local picker in the post editor sidebar
* Per-post action: switch to Draft or move to Trash
* Site-default action configurable in Settings
* Expiry column in the post list table (sortable)
* Expired posts highlighted in red, upcoming in green
* WP-Cron scheduling — no custom cron job needed
* Works with any public post type

== Installation ==

1. Upload the `post-expiration` folder to `/wp-content/plugins/`.
2. Activate the plugin.
3. Open any post or page, set a date in the **Post Expiration** sidebar box, and publish.

== Frequently Asked Questions ==

= Does this require a server cron job? =
No. It uses WP-Cron. For accuracy on low-traffic sites, consider setting up a real server cron to trigger `wp-cron.php` every minute.

= What happens if the site is down at expiry time? =
WP-Cron fires on the next page load after the scheduled time. The post will expire shortly after.

= Can I set a different action per post? =
Yes. Each post has its own "On expiry" dropdown in the sidebar meta box.

== Changelog ==

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.0 =
Initial release.
