[wp-trac] [WordPress Trac] #12922: Setting featured image does not require the post to be saved
WordPress Trac
noreply at wordpress.org
Thu Jul 14 16:02:17 UTC 2016
#12922: Setting featured image does not require the post to be saved
-----------------------------+-----------------------
Reporter: rooodini | Owner: flixos90
Type: defect (bug) | Status: accepted
Priority: normal | Milestone: 4.6
Component: Post Thumbnails | Version: 3.0
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
-----------------------------+-----------------------
Comment (by flixos90):
I have two updated patches which take different approaches on fixing the
previewing issues:
[attachment:12922.5.diff] actually uses revision post meta to store the
post thumbnail. It does not open up post meta to revisions generally, but
adds an exception for the `_thumbnail_id` meta key. The patch ensures that
this meta field is stored as revision meta for all revisions and also
covers autosaving.
[attachment:12922.6.diff] uses a similar approach like we currently have
for the post format. It simply passes the current value of the
`_thumbnail_id` to the preview as a query argument.
After having thought about and tested both implementations, I think we
should rather go with the latter for now. While it is more a workaround
than an actual solution, we can still change it when we actually start
supporting revision meta at some point (see #20299). The first approach
works as well, but I'm not really fond of using revision meta for this
change before we generally open it up, especially since this would include
adding all these exceptions for the `_thumbnail_id` meta key.
Furthermore the revision meta approach could easily cause other issues we
wouldn't wanna deal with that late in Beta cycle. The second one is more
straightforward, so we might be able to deliver it with 4.6.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/12922#comment:28>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list