[wp-trac] [WordPress Trac] #20299: Preview changes on a published post makes all post meta "live"
WordPress Trac
noreply at wordpress.org
Sun Aug 30 23:05:45 UTC 2015
#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 | Resolution:
| Focuses:
| administration
-------------------------------------------------+-------------------------
Comment (by adamsilverstein):
Thanks for the feedback, much appreciated!
A few comments below:
> Looking at 20299.4.patch, there are some inconsistencies:
> - Autosave has nothing to do with previews, maybe better to patch it in
a separate ticket. Also, the patch just "pokes a hole" in it letting
plugins pass through arbitrary data. Maybe that needs some structuring.
Yes, this takes advantage of autosave to add the meta for the preview,
that seemed like a natural progression from the current code. I will try
adding structure. Not exactly sure how :)
> - `$( document.getElementById( meta ) ).val()` should probably be `$(
'#' + meta ).val()`, or `document.getElementById( meta ).value` if you
don't want jQuery.
good suggestion, thanks. jQuery we have, I'm using document.getElementById
out of habit, because it's faster.
> - Namespaces are not supported in PHP 5.2, fatal error :)
Right. I switched the plugin to namespaced to make an eventual core patch
a little cleaner, but really could switch back to a Class for 5.2 compat
at any time if that is preferable.
>
> Having a patch that makes core dependent on a plugin feels off. I
understand it is just for testing, but thinking we need a better way.
>
The better way would be to merge the plugin into core :)
That let us solve this and a handful of other related tickets.
I have some time to put into this now. Should I suggest the plugin as a
feature plugin? I made it a plugin because the code had languished for too
long on #20564 and also to open it up to more users. I have heard from
some people using the plugin successfully.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/20299#comment:51>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list