=== Promo Revert – Temporary Homepage Campaigns ===
Contributors: jaypeeperos
Tags: schedule, homepage, promotion, sale, revert
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

The sale ends. Your regular homepage comes back. If someone edits the sale page, see what changed and keep a copy of their work.

== Description ==

Promo Revert gives a temporary page change an end date. Save the regular version of a page, prepare a sale version in the block editor, and start the sale at the same URL. When it ends, the regular version comes back.

= If someone edits the sale page =

The campaign moves to Needs review and the owner gets an email. The review screen compares the approved sale version with the current page and offers three choices:

* Approve the current sale version and keep the restore time.
* Restore the regular version now, after saving a copy of the current page.
* Keep the current page and cancel the automatic restore.

During setup, you choose what happens if nobody decides by the end time. By default, Promo Revert saves a copy of the current page and restores on time. You can choose to keep the current page live instead.

= What you can rely on =

* Saved versions are stored separately from WordPress revisions, so pruning revisions can't break a restore.
* Each write to the page is conditional. If a save lands at the deadline, Promo Revert checks again and never overwrites work it hasn't seen.
* Repeated scheduler runs are harmless.
* Each campaign records the scheduled and actual restore times and flags overdue restores.
* After a restore, Promo Revert purges supported caches and checks whether the public page still shows the sale.

= What it changes =

Promo Revert swaps the block content or Elementor widget layout stored on one published page. Page titles, featured images, page settings, templates, SEO fields, global styles, shared content, and WooCommerce prices and coupons stay outside the campaign. Edits to shared content may not trigger a review. Edits aren't merged, so a change that should stay on the regular page must be added again after the restore.

For an Elementor page, open the Elementor editor and choose Promo Revert at the bottom right. Use Save page & continue to save current edits and capture the regular version, or Publish page & continue to publish a draft first. Choose Edit sale version to open the private copy, then Save sale version to save it without making it public. The panel includes scheduled starts when a Pro license is active. Save your Elementor changes before starting a campaign. Promo Revert presets are available for block-editor pages.

= Timing =

WP-Cron runs when someone visits your site, so a restore can run late on a quiet site. If your sale needs precise timing, set up a server cron job.

= Promo Revert Pro =

The free plugin runs as many campaigns as you need, one unfinished campaign per page. Promo Revert Pro is a separate add-on with reusable presets, scheduled starts and coordinated multi-page campaigns, plus client setups and a cross-site overview on the Agency plan.

== Installation ==

1. Install and activate the plugin.
2. In Pages, choose Create promo for a page, or open Promo Revert and use Create promo to search for a page. Setup opens automatically in the block editor or Elementor.
3. Choose Use as regular version, Save page & continue, or Publish page & continue as appropriate. Edit the private sale version, then use Save & return to setup to finish setting the end time and start the sale.

== Frequently Asked Questions ==

= Does this add anything to my site's front end? =

While a sale is running, the target page includes one HTML comment, which Promo Revert uses to detect cached copies after the restore. It adds no CSS or JavaScript.

= What happens if I deactivate the plugin during a sale? =

The sale stays on the page and the automatic restore stops. If you reactivate the plugin, an overdue restore runs soon afterward.

= What data does it send? =

None to third parties. After a restore, your site requests its own public page to check for a cached copy. Emails go through your site's normal mail system.

== Changelog ==

= 1.0.1 =
* The free plugin now runs any number of live campaigns at once.
* Admin reminders for campaigns that need review or are overdue can be dismissed. A new edit or a new deadline shows the reminder again.
* Code and translation tidy-ups for the WordPress.org directory.

= 1.0.0 =
* Initial release.
