xwp / wp-settings-revisions

Settings Revisions plugin for WordPress
http://wordpress.org/plugins/settings-revisions/
Other
25 stars 7 forks source link

Add support for registered settings other than options and theme_mods #24

Open westonruter opened 11 years ago

westonruter commented 11 years ago

It's great that options and theme_mods can be registered as settings and previewed in the customizer, and that these changes are automatically revisioned by Settings Revisions. However, what if someone registers a setting with a type other than option or theme_mod? For example, what if someone wanted to use customizer to preview changes to the post content or postmeta in the most recent post on the homepage? Presumably they would have added their own customizer save action and preview action handlers, but should Settings Revisions also add those other kinds of settings to each revision? If previewing changes to a post, then wouldn't the changes more appropriately be saved in post revisions?

This would require prefixing the postmeta more precisely than just with option_ or theme_mod_, as instead [option] or [theme_mod]. That initial bracketed part would get removed.