xwp / wp-customize-snapshots

Customize Snapshots WordPress Plugin
https://wordpress.org/plugins/customize-snapshots/
52 stars 11 forks source link

Force at least one changeset revision to be made #136

Closed westonruter closed 7 years ago

westonruter commented 7 years ago

This is a workaround for hosts, like WPEngine, that force revisions to be disabled. If a changeset/snapshot does not have at least one revision enabled, then it will automatically get sent to the trash and publishing a changeset from the edit post screen the show the error:

You can’t edit this item because it is in the Trash. Please restore it and try again.

Likewise, the revision log of published changesets would be lost due to the auto-trashing.

This forces changesets (and legacy snapshots) to have at least one revision.