xwp / wp-customize-snapshots

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

Add workaround to pretend customize_save ajax action is happening during changeset publishing #137

Closed westonruter closed 7 years ago

westonruter commented 7 years ago

To quote from https://core.trac.wordpress.org/ticket/39221#comment:14

Anne Louise Currie found a defect in core related to this, specifically in publishing a changeset from outside the Customizer, such as via the edit post screen as provided by the Customize Snapshots plugin. In particular, publishing changes to options will fail due to the preview filters being added.

I have amended the PR with a fix: https://github.com/xwp/wordpress-develop/pull/231/commits/3e4dea479df35a8e3b046a2509566c4a95657a91

This PR implements a hacky workaround to make sure that preview logic is not invoked for settings.