-
Notifications
You must be signed in to change notification settings - Fork 37
Use post revisions as storage backend for post/postmeta changes #339
Comments
Lets do it along with #338 as its related. |
@westonruter Meaning a changeset would be created however would not contain the full post settings, but a revision would do? When would the revision be created, each time we click on the preview button? Can you elaborate little more please. |
@sayedtaqui what I mean is that every time that a change to a post is made in the customizer, and the changeset is updated… instead of putting the post data changes into the changeset itself, the changes could instead get routed to the post revision instead. So instead of a changeset containing data like this: {
"post[page][123]": { "value": { "post_title": "About", … } }
} a post would look like: {
"post[page][123]": { "value": 987 }
} Where However, the full post data object should still be sent back to the client for the setting's value and not just the post ID, and so that is where the Maybe! 😄 All of this is experimental and I am not 100% confident it will work. |
There is currently a duplication of pending post data in the customizer vs the post editor. Pending changes made via the edit post screen get stored in a revision whereas the changes made via the customizer get embedded into a changeset. Ideally the pending changes in changesets should get exposed as autosave revisions post editor to continue editing. When editing a post in the customizer and you leave without publishing, those post changes are stored in a changeset. If you go to the editor, you will not see any reference to those changes. It would be helpful to users to list out the posts in pending changesets that they could “import” as an autosave revision to continue editing.
For that matter, should changesets not store the full post content in the changeset but always store it in such post revisions? The underlying setting
value
could be the ID of the revision, where thejs_value
then returns full hydrated content.See https://wordpress.slack.com/archives/core-customize/p1484595235001026
The text was updated successfully, but these errors were encountered: