[wp-trac] [WordPress Trac] #20692: Handle unsaved changes in the customizer
WordPress Trac
noreply at wordpress.org
Sun Sep 29 03:16:01 UTC 2013
#20692: Handle unsaved changes in the customizer
-------------------------+------------------------
Reporter: koopersmith | Owner: helenyhou
Type: enhancement | Status: reopened
Priority: normal | Milestone: 3.4
Component: Appearance | Version: 3.4
Severity: normal | Resolution:
Keywords: has-patch |
-------------------------+------------------------
Changes (by westonruter):
* status: closed => reopened
* resolution: fixed =>
Comment:
Regarding:
> 2) Store unsaved customizations in a customize_data_$stylesheet option.
The fact that certain customize settings persist across theme changes
(options) while others don't (theme_mods and some theme-specific options)
could pose a problem.
I just thought of an alternative to this. Now that autosave will store the
drafted post in `localStorage`, we could do the same for settings in the
customizer. Since all of the settings are stored in memory as JS objects,
when leaving the customizer with unsaved changes it could store those
settings in `localStorage`.
After having abandoned changes, when returning to the customizer, the
initially-disabled "Saved" button could then swap out with an enabled
"Restore" button. As soon as a change is made to a setting on the page,
the Restore button would replace with the "Save & Publish" button, and the
`localStorage`-preserved settings would be discarded. But if you hit
"Restore" then the `localStorage` settings would be populated into the
customizer settings and the button would also change out from "Restore" to
"Save & Publish".
I realize that all of this dovetails nicely with the Settings Revisions
plugin <http://wordpress.org/plugins/settings-revisions/> so this
functionality could be prototyped there.
Thoughts? I'm re-opening this ticket due to the findings from the user
test referenced above.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20692#comment:33>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list