=== TW Link Expiration Manager ===
Contributors: technologywisdom
Tags: post expiration, expire post, auto draft, time-based post, link control
Tested up to: 7.1
Stable tag: 1.2.0
License: GPL-2.0+
License URI: https://opensource.org/licenses/GPL-2.0
Text Domain: tw-link-expiration-manager

Adds an **Expiration Time** for posts, pages, WooCommerce products and custom post types URLs.

== Description ==

**TW Link Expiration Manager** is a simple yet powerful plugin that lets you control how long your WordPress content remains publicly accessible.
Add an expiration date and time to any Posts, Pages, WooCommerce Products and Custom Post Types. Once the expiration time passes, the post will be automatically set to draft and will return a 404 page to visitors.
Perfect for limited-time offers, announcements, event content, or any posts that should only be live temporarily.

**Features:**

- Adds an "Expiration Time" field to both the post editor and Quick Edit panel
- Automatically sets posts to **draft** after expiration
- Expired posts show a 404 page instead of the content
- Works with **all public post types**
- No setup or configuration required. Just install and go

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/`, or install it via the WordPress admin panel.
2. Activate the plugin from the **Plugins** menu.
3. When editing a post, set an expiration date/time in the new **Link Expiration** box.
4. The plugin will handle the rest.

== Changelog ==

= 1.2.0 =
* Major Plugin Support Portal enhancement: more reliable connection.

= 1.1.1 =
* WordPress 7.1 compatibility check
* Bug Fixes

= 1.1.0 =
* Plugin support system is integrated with consent.

= 1.0.4 =
* Improved security by adding permission checks and enforcing server-side consent validation.

= 1.0.3 =
* Fixed Bugs

= 1.0.2 =
* Added review/feedback options
* Added Support page

= 1.0.1 =
* WordPress 7.0 compatibility check

= 1.0.0 =
* Initial release
* Adds expiration functionality for all public post types
* Real-time expiration handling on page visit
* Includes comprehensive tutorial page with step-by-step guidance

== Privacy / External Service ==

This plugin can optionally connect to an external support service operated by Technology Wisdom.

**Service:** [https://pluginsupport.technologywisdom.com](https://pluginsupport.technologywisdom.com)

**Terms of Use:** [https://pluginsupport.technologywisdom.com/terms-of-use/](https://pluginsupport.technologywisdom.com/terms-of-use/)

**Privacy Policy:** [https://pluginsupport.technologywisdom.com/privacy-policy/](https://pluginsupport.technologywisdom.com/privacy-policy/)

The service is used to provide in-plugin support messaging, feedback forwarding, announcements, and connection status for opted-in sites.

**Opt-in consent (required before any connection):**

When you activate the plugin, an admin notice asks whether you want to allow the support connection. You can choose **Allow Support Connection** or **No Thanks**.

* If you allow the connection, the plugin may send: site URL, site name, admin email, plugin name/version, WordPress version, and PHP version. Support requests and review/feedback details are sent only when you submit those forms. The plugin may also check weekly for announcements from Technology Wisdom.
* While the connection is enabled, the plugin may also report a connection status to the portal so we can tell whether the site is **Active**, **Deactivated**, **Disconnected**, or **Deleted**. Status is only sent after you opt in.
* If you decline (or never accept), that data is **not** sent to the support portal. The plugin's core feature continues to work normally without the connection.
* You are never required to allow the connection to use the plugin.
* You can disconnect the support connection at any time from the plugin's Support page by choosing **Disable priority support**. After you disconnect, the plugin stops sending status updates, support traffic, and announcement checks.

Support and rating forms also include their own consent checkboxes before site information is included with a submission.

Please review the service [Terms of Use](https://pluginsupport.technologywisdom.com/terms-of-use/) and [Privacy Policy](https://pluginsupport.technologywisdom.com/privacy-policy/) before enabling the connection.

== Frequently Asked Questions ==

= Does it support custom post types? =

Yes, the expiration feature is automatically added to all public post types, including custom ones.

= What happens when a post expires? =

Once the set expiration time has passed, the plugin will change the post's status to "draft" and show a 404 error page if someone tries to access it.

= Why is the expired post still published after the expiration time? =

The post only changes to "draft" when it's visited. If the post isn't visited after its expiration, it will remain published until accessed. This avoids performance issues from background checks.

= Does it run on cron or scheduled events? =

No, The expiration is handled in real time, ensuring expired posts are processed efficiently when accessed, without cron jobs.

= Does this work with page builders or custom themes? =

Yes. It works independently of your theme or builder, since it only manages post status and 404 behavior.

= Can visitors still view expired posts if they have the direct link? =

No, Once the expiration time passes and the post is visited (to trigger expiration), it’s set to draft. It will show a 404 for all non-logged-in users. Admins can still access it in the dashboard.

= Where can I view a tutorial? =  

You’ll find a full usage tutorial under **Settings → Tutorial (TW LEM)**, including a Video Tutorial

= Can I bulk edit or set expiration dates for multiple posts? =

Currently, expiration is set individually per post via the post editor. Bulk editing is not available yet.

= Can I change how the expiration is handled (like deleting the post instead)? =

Not yet. Future versions may offer customizable expiration actions like trashing, deleting, or redirecting.

= Can I configure the expiration behavior? =

Currently, there is no settings page. A future update may include options for default expiration times or behavior.

== Screenshots ==

1. Screenshot 1: Example of Link Expiration field displayed on a edit post.
2. Screenshot 2: Example of Link Expiration field displayed on a Quick edit post.
3. Screenshot 3: Plugin Tutorial page in the WordPress dashboard.

== License ==

This plugin is licensed under the GPL-2.0+ License. You can freely use, modify, and distribute it under the terms of this license. See the full license at: https://opensource.org/licenses/GPL-2.0