Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for persisting the Customizer state through form submissions #72


None yet
1 participant
Copy link

commented Aug 10, 2016

In the Customizer preview, the changes here allow for forms with a GET request method to be submitted and for the resultant URL to be loaded in the preview. This fixes a Core enhancement #20714: Theme customizer: Impossible to preview a search results page. The reason for disallowing POST requests is that they normally should entail mutating the server state which should be forbidden when using the Customizer, as all changes should flow through Customizer settings and only affected once hitting “Save & Publish”. If a form has a POST request method then any submit buttons will have a not-allowed cursor.

Likewise, when previewing the Customizer state on the frontend (when the customize_snapshot_uuid query param is present), all forms that have action URLs pointing to the WP instance in the current document will be amended to have a customize_snapshot_uuid named input element. In this way, any form submissions done on the frontend will also result in the previewed Customizer state being persisted in the response.

@westonruter westonruter merged commit 9d1ad7a into feature/previewing-improvements Aug 10, 2016

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
continuous-integration/travis-ci/push The Travis CI build passed

@westonruter westonruter deleted the feature/previewing-form-submissions branch Aug 10, 2016

@westonruter westonruter modified the milestone: 0.5.0 Aug 12, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.