[wp-trac] [WordPress Trac] #12922: Setting featured image does not require the post to be saved
WordPress Trac
noreply at wordpress.org
Wed Jul 20 16:23:38 UTC 2016
#12922: Setting featured image does not require the post to be saved
------------------------------+-----------------------
Reporter: rooodini | Owner: flixos90
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 4.6
Component: Post Thumbnails | Version: 3.0
Severity: normal | Resolution: fixed
Keywords: has-patch commit | Focuses:
------------------------------+-----------------------
Changes (by joemcgill):
* status: accepted => closed
* resolution: => fixed
Comment:
In [changeset:"38118"]:
{{{
#!CommitTicketReference repository="" revision="38118"
Post Thumbnails: Only update featured images when saving a post.
Previously, changing the post thumbnail of a published post in the edit
screen
would immediately apply the change, rather than waiting for the post to be
saved before applying the update. This could lead to someone
unintentionally
editing the post thumbnail on a published post, and made it impossible to
preview changes to post thumbnails on published posts before saving the
change.
This introduces a new Ajax handler, `wp_ajax_get_post_thumbnail_html()` to
retrieve the HTML for the post thumbnail meta box without updating the
post
meta value for `_thumbnail_id`. It also allows post thumbnail changes to
be
previewed by passing the `_thumbnail_id` as a query variable to the
preview
screen and adding a new filter, `_wp_preview_post_thumbnail_filter()`,
which
gets applied to `get_post_metadata` during the post preview process.
Props flixos90.
Fixes #12922.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/12922#comment:35>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list