=== Content Unpublisher ===
Contributors: skldrth
Donate link: https://buymeacoffee.com/skilderth
Tags: schedule, unpublish, trash, posts, pages
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

A lightweight plugin to automatically unpublish or trash posts and pages at a scheduled time.

== Description ==

Content Unpublisher lets you schedule a date and time for posts or pages to automatically:
- Be moved to the Trash, or  
- Be converted back to a draft

Perfect for time-sensitive content such as promotions, events, announcements, or temporary landing pages.

If you find this plugin useful, you can [buy me a coffee](https://buymeacoffee.com/skilderth).

**Features:**
- Set a future unpublish date and action per post/page
- Choose to trash or unpublish to draft
- Admin overview table of all scheduled actions
- AJAX-powered remove buttons (no reloads)
- Lightweight and clean – no custom database tables

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/`
2. Activate the plugin through the Plugins screen in WordPress
3. Go to any post or page and set the unpublish schedule in the right sidebar

== Screenshots ==

1. Metabox to schedule unpublishing
2. Overview page showing scheduled actions

== Frequently Asked Questions ==

= Does this use WP Cron? =
Yes, it uses WordPress's built-in scheduling system to run unpublish tasks.

= Which timezone is used? =
The date and time you enter use the timezone configured under Settings > General.

= Can I remove a scheduled unpublish? =
Yes, you can remove it directly from the edit screen or from the overview page via AJAX.

== Changelog ==

= 1.2 =
* Added an optional, unobtrusive "Buy me a coffee" link (Plugins screen, overview page and readme)

= 1.1 =
* Tested up to WordPress 7.1 and PHP 8.3
* Fix: the unpublish time is now interpreted in the site timezone (previously it could run hours too early or too late)
* Fix: clearing the date or action and saving now removes the scheduled event
* Fix: dates in the past are no longer stored as a schedule that never runs
* Security: capability check on the overview page remove action
* Added translation support (text domain: content-unpublisher)
* Added uninstall cleanup of all scheduled data
* Requires WordPress 6.0 and PHP 7.4

= 1.0 =
* Initial release
* Schedule draft or trash actions
* Admin overview
* AJAX removal support

== Upgrade Notice ==

= 1.2 =
Adds an optional donation link. No functional changes.

= 1.1 =
Fixes a timezone bug in scheduling and adds compatibility with WordPress 7.1. Recommended for all users.

= 1.0 =
First stable version

== License ==

This plugin is licensed under the GPLv2 or later.