Now compatible with PHP≥5.2!
One of the greatest features of WordPress is the Customizer which allows you to change settings and preview them in real-time, all before you publish them for everyone to see. (Go ahead and click that big Customize Your Site button on your Dashboard!) But what if you make a change and want to go back in time to restore your previous settings? Changes to posts can be previewed (mostly), and they have revisions which allow you to revert the current version to restore a previous one. The same revision system is needed for settings. This is what the Settings Revisions plugin implements.
In the Customizer, a new section appears at the top called “Settings Revision” and inside of it appears a dropdown of all revisions in the system, showing when they were made, who made them, and what changes were made. A text field appears below which allows users to supply a commit message.
Once installed, also check out the Widget Customizer plugin which brings sidebars and widget form controls into the Customizer, allowing you to edit widgets and preview them just like you do for any other settings in the Customizer. With the Settings Revisions and Widget Customizer plugins combined, you get widget revisions. Also try Settings Revisions with the Styles plugin.
You can access the Customizer by clicking the “Customize Your Site” button on your Dashboard, by accessing the Appearance > Customize menu item in the admin, or on the front-end of your site by clicking the “Customize” sub-menu item in the admin bar. You can also install the Customizer Everywhere plugin which makes the Customizer more accessible and integrates it with post previewing.
Contributors & Developers
“Settings Revisions” is open source software. The following people have contributed to this plugin.Contributors
Interested in development?
- Remove ability to add new revision posts in admin. Fixes (#30). Props kucrut.
- Only update a non-scalar setting’s value if it has not changed according to
_.isEqual. Props westonruter.
- Serialize all values (even strings) when saving settings; this ensures storing non-scalar values, like arrays containing numbers, do not get these values converted into strings. Props westonruter.
- Add a
temp_customize_sanitize_jsfilter so that other plugins can have a chance to run serialization for the output JS-value (used by Widget Customizer); a more robust solution is needed, as noted in the inline comments. Props westonruter.
- Eliminate PHP 5.3 requirement by removing namespaces and closures (#22)
- Fix PHP_CodeSniffer issues according to the WordPress Coding Standards (#17), add to Travis and
- Add jshint to Travis and
- Improve pre-commit hook to optionally scan modified files
Fix handling of settings which contain PHP-serialized values; use
Correct method for updating customizer, by updating settings not by updating controls.
Eliminate strict standards notice
Fix customizer control