=== Gravity Forms Versioning ===
Contributors: gravityforms
Tags: gravity forms, version control, forms, backup, rollback, deployment
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Track changes to your Gravity Forms, compare versions, rollback with one click, and deploy between environments via export/import.

== Description ==

Gravity Forms Versioning brings version control to your forms. Capture a snapshot every time a form is saved, compare any two versions side-by-side, restore an earlier version with one click, and move forms between environments using JSON export/import.

= Features =

* Automatic version capture on every form save
* Manual snapshots with labels, notes, and an optional lock
* Side-by-side diff viewer for fields, settings, confirmations, and notifications
* One-click rollback with an automatic safety backup
* Per-version and per-form JSON export
* Import with conflict detection and overwrite control
* Optional email notifications when forms change
* SHA-256 checksum duplicate detection and retention limits

= Developer Hooks =

* `gf_versioning_after_capture_version`
* `gf_versioning_before_restore_version`
* `gf_versioning_after_restore_version`

== Installation ==

= Requirements =

* WordPress 6.0 or higher
* PHP 7.4 or higher
* Gravity Forms 2.5 or higher

= Install =

1. Upload the plugin folder to `/wp-content/plugins/gravityformsversioning/`, or install via Plugins > Add New > Upload Plugin.
2. Activate the plugin through the Plugins menu in WordPress.
3. Go to Forms > Settings > Versioning to configure auto-capture, retention, and notifications.
4. Open any form's settings and select the Version History tab to view, compare, restore, export, or import versions.

== Frequently Asked Questions ==

= Will this slow down my site? =

No. Version capture only runs during admin form saves. There is no impact on frontend submission performance.

= How much database space does this use? =

Version size scales with form complexity (typically 10–50 KB per snapshot). You can cap retention per form to control storage.

= Can I move forms between staging and production? =

Yes. Export a version (or all versions) as JSON and import on the destination site. The importer detects conflicts before writing.

= Can I undo a restore? =

Yes. Before any restore the current form is captured as a new version, so reverting the restore is one click away.

= What is preserved when I restore? =

Fields, form settings, confirmations, notifications, and conditional logic are all restored from the selected snapshot.

= Are locked versions ever deleted? =

No. Locked versions are exempt from the retention limit and from manual deletion until they are unlocked.

== Changelog ==

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.0.0 =
Initial release.
