[wp-trac] [WordPress Trac] #20299: Preview changes on a published post makes all post meta "live"
WordPress Trac
noreply at wordpress.org
Fri Mar 18 22:45:03 UTC 2016
#20299: Preview changes on a published post makes all post meta "live"
-------------------------------------------------+-------------------------
Reporter: jakemgold | Owner:
Type: defect (bug) | adamsilverstein
Priority: normal | Status: assigned
Component: Revisions | Milestone: Future
Severity: major | Release
Keywords: has-patch needs-testing dev- | Version: 3.3.1
feedback 4.6-early | Resolution:
| Focuses:
| administration
-------------------------------------------------+-------------------------
Comment (by adamsilverstein):
Replying to [comment:57 westonruter]:
> @adamsilverstein in regards to #11049 and not being able to preview a
change to a page template, will the scope here also include addressing the
issue where changing the featured image actually makes it go live
immediately (the opposite problem from page template)?
Yes, this plugin plus some whitelisting would address this issue.
Previews currently rely on an autosave revision to load their data, and
since post meta like featured image is not revisioned it gets saved, then
the stored value 'previewed'.
All that should be required to fix this (after installing the plugin) is
whitelisting `_thumbnail_id` with the `wp_post_revision_meta_keys `
filter. The plugin already includes code to load the revisioned meta for
previews, see https://github.com/adamsilverstein/wp-post-meta-
revisions/blob/master/wp-post-meta-revisions.php#L38
If you have a chance, please give it a try: I will do more testing and
refreshing of patches on my end soon.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/20299#comment:58>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list