Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Only save metaboxes when it's not an autosave #7502
Improves autosave behavior to disable accidental saving of metaboxes. Metaboxes should only be saved on full saves.
See conversation in https://wordpress.slack.com/archives/C02QB2JS7/p1529698040000346
How has this been tested?
When the revision UI appears in Post Settings after step 5, it should indicate 2 revisions, not 4:
Previously, the two autosave events would trigger full save events / revision creation.
Types of changes
Thanks for working on this.
Interesting question pops up for me — if we were to want to look at an autosave overhaul in a distant future version of Gutenberg, one where there is no button at all, there's just an autosave that kicks in when a change is detected, we probably wouldn't be able to make that work for metaboxes. In such a future, could we make the button appear explicitly only when metaboxes are present?
Some previous context / discussion at #6257 (comment)