[wp-trac] [WordPress Trac] #20299: Preview changes on a published post makes all post meta "live"
WordPress Trac
noreply at wordpress.org
Wed Jun 5 12:49:45 UTC 2013
#20299: Preview changes on a published post makes all post meta "live"
-------------------------------------------------+-------------------------
Reporter: jakemgold | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future
Component: Revisions | Release
Severity: major | Version: 3.3.1
Keywords: editorial-flow has-patch needs- | Resolution:
testing |
-------------------------------------------------+-------------------------
Comment (by sanchothefat):
I have some code that gets around this problem for previews that doesn't
feel too horrendous. It's a problem that's been really bothering some of
our clients who want to preview changes to custom post types (eg. events)
with lots of metadata.
Here's the gist: https://gist.github.com/sanchothefat/498ed66a48a4a56d349d
You don't get post meta for each revision rather the preview meta data is
stored against the original post with a prefixed meta_key as others have
suggested. It gets overridden on each update/preview and you won't end up
with orphaned post meta. Works fairly well so far but those sound like
famous last words...
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20299#comment:39>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list